@mjhls/mjh-framework 1.0.810-disable-social-share-v2 → 1.0.810-disable-social-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/View.js CHANGED
@@ -547,12 +547,11 @@ var Article = React.forwardRef(function (props, ref) {
547
547
 
548
548
  var targeting = getTargeting.getTargeting(props);
549
549
 
550
+ //if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
550
551
  if (showSocialShare) {
551
552
  showSocialShare = getSocialShareDisableFlag(props.article);
552
553
  }
553
554
 
554
- console.log('SHOW SOCIAL SHARE', showSocialShare, article);
555
-
556
555
  //If sponsored flag, disable contextual ads
557
556
  if (sponsoredFlag) {
558
557
  article.contextualVideoAD = false;
@@ -1149,8 +1148,7 @@ var Article = React.forwardRef(function (props, ref) {
1149
1148
  twitterSiteName: twitterSiteName,
1150
1149
  disableMeta: true,
1151
1150
  hidePinterest: hidePinterestShare,
1152
- hideFacebook: hideFBShare,
1153
- showSocialShare: showSocialShare
1151
+ hideFacebook: hideFBShare
1154
1152
  })
1155
1153
  )
1156
1154
  ),
@@ -1483,6 +1481,7 @@ var ArticleQueue = function ArticleQueue(props) {
1483
1481
 
1484
1482
  var changeMeta = function changeMeta(meta) {
1485
1483
  document.title = meta.shareTitle;
1484
+ //this was throwing an error if there was no description, doing a check for the description meta
1486
1485
  if (document.querySelector('meta[name="description"]')) document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
1487
1486
  document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
1488
1487
  document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
@@ -1492,6 +1491,7 @@ var ArticleQueue = function ArticleQueue(props) {
1492
1491
  document.querySelector('meta[name="twitter:title"]').setAttribute('content', meta.shareTitle);
1493
1492
  document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
1494
1493
  document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
1494
+ //this was throwing an error if there was no description, doing a check for the description meta
1495
1495
  if (document.querySelector('meta[name="twitter:description"]')) document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
1496
1496
  if (canonicalTag) {
1497
1497
  document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
@@ -1721,7 +1721,7 @@ var View = function View(props) {
1721
1721
  props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default['default'].createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
1722
1722
  )
1723
1723
  ),
1724
- !needInfiniteScroll ? React__default['default'].createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props, { showSocialShare: showSocialShare })) : React__default['default'].createElement(ArticleQueue, _extends._extends({
1724
+ !needInfiniteScroll ? React__default['default'].createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props)) : React__default['default'].createElement(ArticleQueue, _extends._extends({
1725
1725
  infiniteScroll: true,
1726
1726
  showRelatedArticles: showRelatedArticles,
1727
1727
  canonicalTag: canonicalTag,
package/dist/esm/View.js CHANGED
@@ -537,12 +537,11 @@ var Article = forwardRef(function (props, ref) {
537
537
 
538
538
  var targeting = getTargeting(props);
539
539
 
540
+ //if showSocialShare is not disabled for entire site, check article taxonomy, docgroup, authors for showSocialShare === false
540
541
  if (showSocialShare) {
541
542
  showSocialShare = getSocialShareDisableFlag(props.article);
542
543
  }
543
544
 
544
- console.log('SHOW SOCIAL SHARE', showSocialShare, article);
545
-
546
545
  //If sponsored flag, disable contextual ads
547
546
  if (sponsoredFlag) {
548
547
  article.contextualVideoAD = false;
@@ -1139,8 +1138,7 @@ var Article = forwardRef(function (props, ref) {
1139
1138
  twitterSiteName: twitterSiteName,
1140
1139
  disableMeta: true,
1141
1140
  hidePinterest: hidePinterestShare,
1142
- hideFacebook: hideFBShare,
1143
- showSocialShare: showSocialShare
1141
+ hideFacebook: hideFBShare
1144
1142
  })
1145
1143
  )
1146
1144
  ),
@@ -1473,6 +1471,7 @@ var ArticleQueue = function ArticleQueue(props) {
1473
1471
 
1474
1472
  var changeMeta = function changeMeta(meta) {
1475
1473
  document.title = meta.shareTitle;
1474
+ //this was throwing an error if there was no description, doing a check for the description meta
1476
1475
  if (document.querySelector('meta[name="description"]')) document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
1477
1476
  document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
1478
1477
  document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
@@ -1482,6 +1481,7 @@ var ArticleQueue = function ArticleQueue(props) {
1482
1481
  document.querySelector('meta[name="twitter:title"]').setAttribute('content', meta.shareTitle);
1483
1482
  document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
1484
1483
  document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
1484
+ //this was throwing an error if there was no description, doing a check for the description meta
1485
1485
  if (document.querySelector('meta[name="twitter:description"]')) document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
1486
1486
  if (canonicalTag) {
1487
1487
  document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
@@ -1711,7 +1711,7 @@ var View = function View(props) {
1711
1711
  props.article.seriesDetail && props.article.seriesDetail.nextUrl && React.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
1712
1712
  )
1713
1713
  ),
1714
- !needInfiniteScroll ? React.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props, { showSocialShare: showSocialShare })) : React.createElement(ArticleQueue, _extends({
1714
+ !needInfiniteScroll ? React.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props)) : React.createElement(ArticleQueue, _extends({
1715
1715
  infiniteScroll: true,
1716
1716
  showRelatedArticles: showRelatedArticles,
1717
1717
  canonicalTag: canonicalTag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.810-disable-social-share-v2",
3
+ "version": "1.0.810-disable-social-test",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",