Loading browser/components/pocket/content/panels/js/components/ArticleList/ArticleList.jsx +12 −11 Original line number Diff line number Diff line Loading @@ -43,11 +43,22 @@ function Article(props) { utmParams, openInPocketReader, } = props; const url = new URL(article.url || article.resolved_url || ""); const urlSearchParams = new URLSearchParams(utmParams); if ( openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/) ) { url.href = `https://getpocket.com/read/${article.item_id}`; } for (let [key, val] of urlSearchParams.entries()) { url.searchParams.set(key, val); } // Using array notation because there is a key titled `1` (`images` is an object) const thumbnail = article.thumbnail || Loading @@ -60,20 +71,10 @@ function Article(props) { article.domain_metadata?.name || article.resolved_domain; let constructedURL = url.href; if ( openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/) ) { constructedURL = `https://getpocket.com/read/${article.item_id}`; } return ( <li className="stp_article_list_item"> <ArticleUrl url={constructedURL} url={url.href} savedArticle={savedArticle} position={position} source={source} Loading browser/components/pocket/content/panels/js/components/Saved/Saved.jsx +5 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,11 @@ function Saved(props) { </Button> </h3> {savedStory && ( <ArticleList articles={[savedStory]} openInPocketReader={true} /> <ArticleList articles={[savedStory]} openInPocketReader={true} utmParams={utmParams} /> )} <TagPicker tags={[]} itemUrl={itemUrl} /> {similarRecs?.length && locale?.startsWith("en") && ( Loading browser/components/pocket/content/panels/js/main.bundle.js +7 −8 Original line number Diff line number Diff line Loading @@ -174,6 +174,10 @@ function Article(props) { const url = new URL(article.url || article.resolved_url || ""); const urlSearchParams = new URLSearchParams(utmParams); if (openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/)) { url.href = `https://getpocket.com/read/${article.item_id}`; } for (let [key, val] of urlSearchParams.entries()) { url.searchParams.set(key, val); } // Using array notation because there is a key titled `1` (`images` is an object) Loading @@ -184,16 +188,10 @@ function Article(props) { const title = article.title || article.resolved_title; // Sometimes domain_metadata is not there, depending on the source. const publisher = article.publisher || article.domain_metadata?.name || article.resolved_domain; let constructedURL = url.href; if (openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/)) { constructedURL = `https://getpocket.com/read/${article.item_id}`; } return /*#__PURE__*/react.createElement("li", { className: "stp_article_list_item" }, /*#__PURE__*/react.createElement(ArticleUrl, { url: constructedURL, url: url.href, savedArticle: savedArticle, position: position, source: source, Loading Loading @@ -1008,7 +1006,8 @@ function Saved(props) { "data-l10n-id": "pocket-panel-button-remove" }))), savedStory && /*#__PURE__*/react.createElement(ArticleList_ArticleList, { articles: [savedStory], openInPocketReader: true openInPocketReader: true, utmParams: utmParams }), /*#__PURE__*/react.createElement(TagPicker_TagPicker, { tags: [], itemUrl: itemUrl Loading Loading
browser/components/pocket/content/panels/js/components/ArticleList/ArticleList.jsx +12 −11 Original line number Diff line number Diff line Loading @@ -43,11 +43,22 @@ function Article(props) { utmParams, openInPocketReader, } = props; const url = new URL(article.url || article.resolved_url || ""); const urlSearchParams = new URLSearchParams(utmParams); if ( openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/) ) { url.href = `https://getpocket.com/read/${article.item_id}`; } for (let [key, val] of urlSearchParams.entries()) { url.searchParams.set(key, val); } // Using array notation because there is a key titled `1` (`images` is an object) const thumbnail = article.thumbnail || Loading @@ -60,20 +71,10 @@ function Article(props) { article.domain_metadata?.name || article.resolved_domain; let constructedURL = url.href; if ( openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/) ) { constructedURL = `https://getpocket.com/read/${article.item_id}`; } return ( <li className="stp_article_list_item"> <ArticleUrl url={constructedURL} url={url.href} savedArticle={savedArticle} position={position} source={source} Loading
browser/components/pocket/content/panels/js/components/Saved/Saved.jsx +5 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,11 @@ function Saved(props) { </Button> </h3> {savedStory && ( <ArticleList articles={[savedStory]} openInPocketReader={true} /> <ArticleList articles={[savedStory]} openInPocketReader={true} utmParams={utmParams} /> )} <TagPicker tags={[]} itemUrl={itemUrl} /> {similarRecs?.length && locale?.startsWith("en") && ( Loading
browser/components/pocket/content/panels/js/main.bundle.js +7 −8 Original line number Diff line number Diff line Loading @@ -174,6 +174,10 @@ function Article(props) { const url = new URL(article.url || article.resolved_url || ""); const urlSearchParams = new URLSearchParams(utmParams); if (openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/)) { url.href = `https://getpocket.com/read/${article.item_id}`; } for (let [key, val] of urlSearchParams.entries()) { url.searchParams.set(key, val); } // Using array notation because there is a key titled `1` (`images` is an object) Loading @@ -184,16 +188,10 @@ function Article(props) { const title = article.title || article.resolved_title; // Sometimes domain_metadata is not there, depending on the source. const publisher = article.publisher || article.domain_metadata?.name || article.resolved_domain; let constructedURL = url.href; if (openInPocketReader && article.item_id && !url.href.match(/getpocket\.com\/read/)) { constructedURL = `https://getpocket.com/read/${article.item_id}`; } return /*#__PURE__*/react.createElement("li", { className: "stp_article_list_item" }, /*#__PURE__*/react.createElement(ArticleUrl, { url: constructedURL, url: url.href, savedArticle: savedArticle, position: position, source: source, Loading Loading @@ -1008,7 +1006,8 @@ function Saved(props) { "data-l10n-id": "pocket-panel-button-remove" }))), savedStory && /*#__PURE__*/react.createElement(ArticleList_ArticleList, { articles: [savedStory], openInPocketReader: true openInPocketReader: true, utmParams: utmParams }), /*#__PURE__*/react.createElement(TagPicker_TagPicker, { tags: [], itemUrl: itemUrl Loading