United Health Products Inc (UEEC) Quote


].join(“”);
}
return template;
}

/**
* Generate a template for the label
* @param {String} label – the label text
* @returns {String}
*/
function displayLabel(label) {
var template = “”;
if (label === “opinion”) {
template = [

“,
“, label, ““,

“,
].join(“”);
}
return template;
}

/**
* Display “Follow”, “Following” buttons
* @param {Object} tData
* @returns {String}
*/
function displayFollowingButton(tData) {
var topicName = tData.topicName;
var topicSlug = tData.topicSlug;
var topicType = tData.topicType;
var topicImg = tData.topicImg;
var isAuthor = topicType === “author”;
var authorImg = isAuthor && topicImg
? “" + topicName + "
: “”;
var template = isAuthor ? “/authors/” : “/topics/”;
var href = window.tgam.env.baseRootAbsoluteUrl + template + topicSlug;
var linkClasses = isAuthor ? “c-topic-link c-topic-link–author” : “c-topic-link”;
return [
” “,
].join(“”);
}

/**
* Generates story card markup
* @param {Object} article – to display
* @param {Object} topicData – (topicName, topicSlug, topicType, topicVariation, topicImg)
* @param {Boolean} addFollowButton
* @returns {String} story card markup
*/
function storyCard(article, topicData, addFollowButton) {
// console.info(“[ARC-7231] storyCard”, { article: article, topic: topicData });
if (!article || !topicData) {
return “”;
}
var tName = topicData.topicName;
var tType = topicData.topicType;
var tVariation = topicData.topicVariation;
var followingTopic;
var timeTemplate;
var analyticsModifier = tType + “: “;

if (addFollowButton) {
// Display a follow button beside the topic name
followingTopic = displayFollowingButton(topicData);
timeTemplate = displayDateTag(article);
}
var label = getLabel(article);
var image = getImage(article, label);
var labelTemplate = displayLabel(label);
var imageTemplate = displayImage(image);
var headline = article.headlines.basic;
var href = window.tgam.env.baseUrl + article.canonical_url;
var sophiId = article._id;

var dataAnalyticsClick = JSON.stringify({
type: “link”,
feature: “following feed”,
contentId: sophiId,
label: analyticsModifier + tName.toLowerCase() + “: ” + headline.toLowerCase(),
page: “sec:homepage:personalized feed:” + tVariation,
hierarchy: 1
});

var cardMarkup = “”;
if (!followingTopic) {
cardMarkup = [
“,

“,

“,
“, tName, ““,

“,

“,
“, headline, ““,

“,
labelTemplate,

“,

“, imageTemplate, “

“,
[1]
].join(“”);
} else {
cardMarkup = [

“,
followingTopic,

“,
“,

“,

“,
“, headline, ““,

“,
“, timeTemplate, ““,

“,

“, imageTemplate, “

“,
[2]“,
].join(“”);
}
return [

“,
cardMarkup,

“,
].join(“”);
}

/**
* Adds the overlay trigger dot class
* @param {String} type – “unread” or “no-follow”
*/
function addOverlayTriggerDot(type) {
overlayTriggerDotClasses.forEach(function fn(dotClass) {
if (dotClass === “c-your-globe__trigger–dot–” + type) {
overlayTrigger.classList.add(dotClass);
} else {
overlayTrigger.classList.remove(dotClass);
}
});
overlayTrigger.classList.add(“c-your-globe__trigger–dot”);
}

/**
* Removes the overlay trigger dot class
*/
function removeOverlayTriggerDot() {
overlayTriggerDotClasses.forEach(function fn(dotClass) {
overlayTrigger.classList.remove(dotClass);
});
overlayTrigger.classList.remove(“c-your-globe__trigger–dot”);
}

/**
* Returns a heading element to be displayed inside the overlay
* @param {String} text
* @returns {String}
*/
function overlayLabel(text) {
return “

” + text + “

“;
}

var overlayHeadingHasFollowed = (
overlayLabel(“The latest in topics and authors you follow”) +

View more in Following[3]


);

var overlayHeadingNoFollowed = (
overlayLabel(“Get started: build your personal news feed”) +

    ” +

  1. Follow topics relevant to your reading interests.
  2. ” +

  3. Check back here or your Following page[4] to view the latest articles on your topics.
  4. ” +


);

var upToDateMessage = “

You’re up to date on your Following feed. Check again later for new stories.

“;

// ************************************************
// Parse API response and inject markup into overlay
// ************************************************

// Story card markup

/**
* Stories originally came from the following locations in the API response:
* – data.articles[i].items[i].topics
* – data.articles[i].items[i].authors
* @param {Array} stories
* @returns {String} story card markup
*/
function latestStoryCards(stories) {
console.info(“[ARC-7231] Display latest stories based on these stories:”, stories);

var storyCards = stories.map(function fn(story) {
// The “topics” and “authors” arrays will only contain one item
// (i.e. the topic or author that the user is following)
var topic;
var topicData;

if (story.topics && story.topics.length) {
// Normal topic
topic = story.topics[0];
topicData = {
topicName: topic.name,
topicSlug: topic.slug,
topicType: “topic”,
topicVariation: “following”
};
} else if (story.authors && story.authors.length) {
// Author topic
topic = story.authors[0];
// Only authors have images associated with them – normal topics do not
var authorImg = topic.metadata && topic.metadata.image ? topic.metadata.image : null;
topicData = {
topicName: topic.byline,
topicSlug: topic.slug,
topicType: “author”,
topicVariation: “following”,
topicImg: authorImg
};
}
// Don’t display a follow button beside the topic because the user is already following it
return storyCard(story, topicData, false);
}).join(“”);

return storyCards;
}

/**
* @param {Array} topics
* @param {String} variation – “recommended” or “trending” (used for the click tracking analytics)
* @returns {String} story card markup
*/
function recommendedTrendingStoryCards(topics, variation) {
var uniqueStories = generateUniqueStory(topics);
var storyCards = uniqueStories.map(function fn(topic) {
// Grab one article
var story = topic.items[0];
// Only authors have images associated with them – normal topics do not
var authorImg = topic.authorTopic && topic.authorMetadata && topic.authorMetadata.image
? topic.authorMetadata.image
: null;
// Normally we’d display all of the topics that are assigned to an article, but
// this API groups articles by topic, so we only have access to that one topic.
// Even if we could display additional topics, we wouldn’t want to becuase having
// multiple follow buttons would junk up the UI.
var topicData = {
topicName: topic.name,
topicSlug: topic.slug,
topicType: topic.authorTopic ? “author” : “topic”,
topicVariation: variation,
topicImg: authorImg
};
// Display the follow button beside the topic because we’re suggesting new topics to follow
return storyCard(story, topicData, true);
}).join(“”);

return storyCards;
}

/**
* Topics originally came from the following locations in the API response:
* – data.recommendedAuthors
* – data.recommendedTopics
* @param {Array} topics
* @returns {String} story card markup
*/
function recommendedStoryCards(topics) {
console.info(“[ARC-7231] Display recommended stories based on these topics:”, topics);
return recommendedTrendingStoryCards(topics, “recommended”);
}

/**
* Topics originally came from the following location in the API response:
* – data.trendingTopics
* @param {Array} topics
* @returns {String} story card markup
*/
function trendingStoryCards(topics) {
console.info(“[ARC-7231] Display trending stories based on these topics:”, topics);
return recommendedTrendingStoryCards(topics, “trending”);
}

// Markup inside the overlay

/**
* @param {Array} stories
* @returns {Object} markup for the overlay’s header and body content areas
*/
function showLatestStories(stories) {
console.info(“[ARC-7231] Scenario: latest stories”);
var storyCardsMarkup = latestStoryCards(stories);
return {
header: overlayHeadingHasFollowed,
body: storyCardsMarkup
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function upToDateShowRecommended(topics) {
console.info(“[ARC-7231] Scenario: up to date, show recommended”);
var storyCardsMarkup = recommendedStoryCards(topics);
return {
header: overlayHeadingHasFollowed,
body: (
upToDateMessage +
overlayLabel(“Recommended for you”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function upToDateShowTrending(topics) {
console.info(“[ARC-7231] Scenario: up to date, show trending”);
var storyCardsMarkup = trendingStoryCards(topics);
return {
header: overlayHeadingHasFollowed,
body: (
upToDateMessage +
overlayLabel(“Trending topics to follow”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function notFollowingShowRecommended(topics) {
console.info(“[ARC-7231] Scenario: not following, show recommended”);
var storyCardsMarkup = recommendedStoryCards(topics);
return {
header: overlayHeadingNoFollowed,
body: (
overlayLabel(“Recommended for you”) +
storyCardsMarkup
)
};
}

/**
* @param {Array} topics
* @returns {Object} markup for the overlay’s header and body content areas
*/
function notFollowingShowTrending(topics) {
console.info(“[ARC-7231] Scenario: not following, show trending”);
var storyCardsMarkup = trendingStoryCards(topics);
return {
header: overlayHeadingNoFollowed,
body: (
overlayLabel(“Trending topics to follow”) +
storyCardsMarkup
)
};
}

/**
* Parse data from the personalized API and inject markup into the overlay
* @see https://confluence.theglobeandmail.com/display/ARC/Logic+for+Embedded+on+Homepage++and+Your+Globe+Overlay
* @param {Object} data – topic and story data provided by the API
* @param {String} hashId – user’s hash id
*/
function parsePerzonalizedTopicsData(data, hashId) {
console.info(“[ARC-7231] parsePerzonalizedTopicsData”, data);

var totalTopicsFollowed = data.totalTopicsFollowed || 0;
var totalAuthorsFollowed = data.totalAuthorsFollowed || 0;
var recommendedTopics = data.recommendedTopics || [];
var recommendedAuthors = data.recommendedAuthors || [];
var latestStories = data.articles || [];
var topics = [];
var stories = [];
var markup = “”;

if (totalTopicsFollowed || totalAuthorsFollowed) {
if (latestStories.length) {
// Scenario 1: “Latest stories”

// Count the number of stories returned (for logging/debugging purposes only)
var latestStoriesCount = latestStories.reduce(function _reduceStories(accumulator, date) {
var urls = date.items.map(function _mapStories(article) {
return article.canonical_url;
});
return accumulator.concat(urls);
}, []).length;
console.info(“[ARC-7231] latestStoryUrls (” + latestStoriesCount + “)”);

// Fetch the user’s reading history
// TODO: this API request will no longer be necessary when Data Science makes
// the “isRead” property functional (it’s currently “false” 100% of the time)
getReadingHistory(hashId).then(function _historyFetched(historyData) {
var readingHistoryUrls = historyData.map(function _mapHistory(item) {
return item.url;
});
console.info(“[ARC-7231] readingHistoryUrls (” + readingHistoryUrls.length + “)”);
var currentArticleUrl = window.tgam.meta.pagetype === “story” ? window.tgam.meta.urlRelative : null;

// Filter out stories that exist in the user’s reading history
var filteredStories = latestStories.map(function _mapDates(dateObj) {
var items = dateObj.items.filter(function _filterStories(article) {
var articleUrl = article.canonical_url;
var shouldRemove = readingHistoryUrls.includes(articleUrl) || article.isRead || articleUrl === currentArticleUrl;
if (shouldRemove) {
if (articleUrl === currentArticleUrl) {
console.info(“[ARC-7231] Currently reading this article, so removing: ” + articleUrl);
} else {
console.info(“[ARC-7231] Has already been read, so removing: ” + articleUrl);
}
}
return !shouldRemove;
});
return {
date: dateObj.date,
items: items
};
}, []);

stories = generateLatestStories(filteredStories);
markup = showLatestStories(stories);

var atLeastOneStoryIsNew = isLocalStorageSupported() ? checkNewStories(stories) : true;
if (atLeastOneStoryIsNew) {
// Display indicator only when there is a new story since the last time the user checked the feed
addOverlayTriggerDot(“unread”);
}
populateOverlay(markup, true);
});
} else {
if (recommendedTopics.length || recommendedAuthors.length) {
// Scenario 2: “Up to date, show recommended”
topics = recommendedAuthors.concat(recommendedTopics);
markup = upToDateShowRecommended(topics);
} else {
// Scenario 3: “Up to date, show trending”
topics = data.trendingTopics || [];
markup = upToDateShowTrending(topics);
}
populateOverlay(markup, true);
}
} else {
topics = recommendedAuthors.concat(recommendedTopics);
if (topics.length) {
// Scenario 4: “Not following, show recommended”
markup = notFollowingShowRecommended(topics);
} else {
// Scenario 5: “Not following, show trending”
topics = data.trendingTopics || [];
markup = notFollowingShowTrending(topics);
}
addOverlayTriggerDot(“no-follow”);
populateOverlay(markup, false);
}
}

/**
* Populate the overlay with content and activate the “following” functionality
* @param {String} markup – HTML markup
* @param {Boolean} headerBorder – whether to include a header border
*/
function populateOverlay(markup, headerBorder) {
var overlayHeader = qs(“.c-your-globe__overlay-header”);
var overlayHeaderText = qs(“.c-your-globe__overlay-header-text”);
var overlayBody = qs(“.c-your-globe__overlay-body”);

if (!overlayHeader || !overlayHeaderText || !overlayBody) {
return;
}
console.info(“[ARC-7231] Append markup”);

var spinner = qs(“.c-spinner”);
spinner && spinner.parentElement.removeChild(spinner);

overlayHeaderText.insertAdjacentHTML(“afterbegin”, markup.header);
overlayBody.insertAdjacentHTML(“afterbegin”, markup.body);

if (!headerBorder) {
overlayHeader.classList.add(“c-your-globe__overlay-header–no-border”);
}
addFollowingFunctionality();
}

// ************************************************
// API calls
// ************************************************

// Reading History API

/**
* Validate a response has an “ok” status, and is in the range 200-299 inclusive.
* @param {Response} response – to validate
* @returns {Promise

Source URL: Read More
The public content above was dynamically discovered – by graded relevancy to this site’s keyword domain name. Such discovery was by systematic attempts to filter for “Creative Commons“ re-use licensing and/or by Press Release distributions. “Source URL” states the content’s owner and/or publisher. When possible, this site references the content above to generate its value-add, the dynamic sentimental analysis below, which allows us to research global sentiments across a multitude of topics related to this site’s specific keyword domain name. Additionally, when possible, this site references the content above to provide on-demand (multilingual) translations and/or to power its “Read Article to Me” feature, which reads the content aloud to visitors. Where applicable, this site also auto-generates a “References” section, which appends the content above by listing all mentioned links. Views expressed in the content above are solely those of the author(s). We do not endorse, offer to sell, promote, recommend, or, otherwise, make any statement about the content above. We reference the content above for your “reading” entertainment purposes only. Review “DMCA & Terms”, at the bottom of this site, for terms of your access and use as well as for applicable DMCA take-down request.

Acquire this Domain
You can acquire this site’s domain name! We have nurtured its online marketing value by systematically curating this site by the domain’s relevant keywords. Explore our content network – you can advertise on each or rent vs. buy the domain. [email protected] | Skype: TLDtraders | +1 (475) BUY-NAME (289 – 6263). Thousands search by this site’s exact keyword domain name! Most are sent here because search engines often love the keyword. This domain can be your 24/7 lead generator! If you own it, you could capture a large amount of online traffic for your niche. Stop wasting money on ads. Instead, buy this domain to gain a long-term marketing asset. If you can’t afford to buy then you can rent the domain.

About Us
We are Internet Investors, Developers, and Incubators- operating a content network of several thousand sites while federating 20+ eCommerce and SaaS startups. With our proprietary “inverted incubation” model, we leverage a portfolio of $15M+ in valued domains to impact online trends, traffic, and transactions. We use robotic process automation, machine learning, and other proprietary approaches to power our content network. Discover our work!

Share