“),t.type){case”pdf”:if(a.default.isFirefox()||a.default.isEdge()||a.default.isIE())try{if(console.info(“PrintJS वर्तमान में फ़ायरफ़ॉक्स, इंटरनेट एक्सप्लोरर और में पीडीएफ प्रिंटिंग का समर्थन नहीं करता है एज।”),!0===t.onBrowserIncompatible())window.open(t.fallbackPrintable,”_blank”).focus(),t.onPdfOpen&&t.onP dfOpen()}catch(e){t.onError(e)}अंततः{t.showModal&&l.default.close(),t.onLoadingEnd&&t.onLoadingEnd()}अन्यथा d.default.print(t,o);break;case”image”:f.default.print(t,o);break;case”html”:u.default.print(t,o);break;case”raw-html”:c.default.print(t,o);break;case”json”:s.default.print(t,o)}}}}, function(e,t,n){“use strict”;Object.defineProperty(t,”__esModule”,{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=n(1);function l(e,t,n){var r=new window.Blob([n],{type:”application/pdf”});r=window.URL.createObjectURL(r),t.setAttribute(“src”,r),i.default.send(e,t)}t.default={print:function(e,t){if(e.base64){var n=Uint8Array.from(atob(e.printable),function(e){return e.charCodeAt(0)});l(e,t,n)}else{e.printable=/^(blob|http)/i.test(e.printable)?e.printable:window.location.origin+(“/”!==e.printable.charAt(0)?”/”+e.printable:e.printable);var r=new window.XMLHttpRequest;r.responseType=’arraybuffer’,r.addEventListener(‘load’,function(){if(-1===[200,201]। strict”;Object.defineProperty(t,”__esModule”,{value:!0});var r,o=n(1),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};t.default={print:function(e,t){var n=document.getElementById(e.printable);n?(e.printableElement=function e(t,n){var r=t.cloneNode();var o=!0;var i=!1;var a=void 0;try{for(var l,d=t.childNodes[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var u=l.value;if(-1===n.ignoreElements.indexOf(u.id)){var c=e(u,n);r.appendChild(c)}}}catch(e){i=!0,a=e}अंततः{प्रयास{!o&&d.return&&d.return()}अंततः{if(i)फेंक a}}switch(t.tagName){case”SELECT”:r.value=t.value;break;case”CANVAS”:r.getContext(“2d”).drawImage(t,0,0)}रिटर्न r}(n,e),e.header&&(0,o.addHeader)(e.printableElement,e),a.default.send(e,t)):window.console.error(“अमान्य HTML तत्व आईडी: “+e.printable)}}},function(e,t,n){“use strict”;Object.defineProperty(t,”__esModule”,{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};t.default={print:function(e,t){e.printableElement=document.createElement(“div”),e.prin TableElement.setAttribute(“style”,”width:100%”),e.printableElement.innerHTML=e.printable,i.default.send(e,t)}}},function(e,t,n){“use strict”;Object.defineProperty(t,”__esModule”,{value:!0});var r,o=n(1),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};t.default={print:function(r,e){r.printable.constructor!==Array&&(r.printable=[r.printable]),r.printableElement=document.createElement(“div”),r.printable.forEach(function(e){var t=document.createElement(“img”);t.setAttribute(“style”,r.imageStyle),t.src=e;var n=document.createElement(“div”);n.appendChild(t),r.printableElement.appendChild(n)}),r.header&&(0,o.addHeader)(r.printableElement,r),a.default.send(r,e)}}},function(e,t,n){“use strict”;Object.defineProperty(t,”__esModule”,{value:!0});var r,o=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&”function”==typeof Symbol&e.constructor===Symbol&&e!==Symbol.prototype?”symbol”:typeof e},c=n(1),i=n(0),a=(r=i)&&r.__esModule?r:{default:r};t.default={print:function(t,e){if(“object”!==o(t.printable))throw new Error(‘अमान्य जावास्क्रिप्ट डेटा ऑब्जेक्ट (JSON)’);if(‘boolean’!=typeof t.repeatTableHeader)throw new Error(‘invalid value for restartTableHeader विशेषता (JSON)’);if(!t.properties||!Array.isArray(t.properties))throw new Error(‘आपके JSON के लिए अमान्य गुण सरणी डेटा। 0===ई?”अपरिभाषित”:o(e))&&e.columnSize?e.columnSize+”;”:100/t.properties.length+”%;”}}),t.printableElement=document .createElement(“div”),t.header&&(0,c.addHeader)(t.printableElement,t),t.printableElement.innerHTML+=function(e){var t=e.मुद्रणयोग्य,n=e.गुण,r=’
“}(t),a.default.send(t,e)}}}].default}); document.querySelector(‘.all-content-wrapper’).setAttribute(‘id’,’printable’); ChangeListener(‘.lead_post_body_main .share-pinterest, .mobile_social_links .share-pinterest’, function(el) { el.outerHTML=’‘; }); /* https://partners.rebelmouse.com/commondreams/print.css?s=0 */ ChangeListener(‘.lead_post_body_main .share-print, .mobile_social_links .share-print’, function(el) { setTimeout(()=>{// यह सेट टाइमआउट सिस्टम द्वारा लगाए गए इवेंट श्रोता el.addEventListener(“click”, function(){ if को बायपास करने के लिए महत्वपूर्ण है (navigator.userAgent.indexOf(“Firefox”) > 0) {window.print();}else{ printJS({printable: ‘printable’,type: ‘html’, targetStyles: [‘*’]शैली: `.नो-प्रिंट { डिस्प्ले: कोई नहीं !महत्वपूर्ण; } बॉडी { पैडिंग: 0 20px; बॉक्स-आकार: बॉर्डर-बॉक्स; } img {चौड़ाई: 100%; } ए {रंग: #000; } * {फ़ॉन्ट-फ़ैमिली: एरियल !महत्वपूर्ण; लाइन-ऊंचाई: 1.6; } .widget__subheadline-text { फ़ॉन्ट-वजन: 400 !महत्वपूर्ण; } .फोटो-कैप्शन, .फोटो-क्रेडिट, आईएमजी, ए.शेयर, एसवीजी, .कैंपेन-आर्टिकल, स्पैन.शेयर, .डेटफिक्सरडेट { डिस्प्ले: कोई नहीं !महत्वपूर्ण; } .ट्रिनिटी-प्लेयर-आईफ्रेम-रैपर, .रीसर्क्युलेशन-रैपर, .न्यूज़लेटर-एसाइड, .आरएम-एम्बेड.एम्बेड-मीडिया { डिस्प्ले: कोई नहीं !महत्वपूर्ण; } .पोस्ट-कस्टम .विजेट { डिस्प्ले: ब्लॉक; } .पंक्ति {मार्जिन-बॉटम: 0; मार्जिन-टॉप: 0px; } .क्लियरफिक्स:पहले, .क्लियरफिक्स:बाद में { डिस्प्ले: कोई नहीं !महत्वपूर्ण; } .lead_post_body_main .widget__head, .widget__shares { प्रदर्शन: कोई नहीं; } एसवीजी, .ब्रेकिंग-न्यूज-टॉप-रैपर, .नॉर्मल__ब्लैकबार, .स्टिकी__ब्लैकबार, .ब्रेडक्रंब्स_मेनरैपर, .ब्लैकबार, .ब्लैक_न्यूजलेटर, .यूजर-प्रिफ्स, .कस्टम-डीबॉक्स-पॉपअपज़, .डोनेट_बीटीएन, .ग्रे_डोनेट_ब्लॉक, .मेनू-ग्लोबल, .modal_donor, .lead_post_tags_seo .body-description, .authors_post_block, .datefixerdate, .widget__shares { प्रदर्शन: कोई नहीं; } .lead_post_post_body, .lead_post_body_main .posts-custom .widget__headline, .lead_post_body_main .widget__subheadline { अधिकतम-चौड़ाई: 100%; } .lead_post_body_main .posts-custom p.pull-quote:before { प्रदर्शन: कोई नहीं; } .lead_post_body_main .posts-custom p.pull-quote { अधिकतम-चौड़ाई: 100%; मार्जिन: 0; पैडिंग: 10px 0; } .rm-shortcode, .content_newsletter_wrapper, .social_stream_desktop, .lead_post_tags_seo .body-description .round-the-web, .lead_post_tags_seo .body-description .round-the-web * { डिस्प्ले: कोई नहीं; } .lead_post_tags_seo .social-author { प्रदर्शन: कोई नहीं; } .creative_common_work { अधिकतम-चौड़ाई: 100%; मार्जिन-बॉटम: 50px; बॉर्डर-बॉटम: 1px सॉलिड #ccc; } .authors_post_block, .lead_post_tags_seo { अधिकतम-चौड़ाई: 100%; } .lead_post_share_social { स्थिति: अनसेट; चौड़ाई: 100%; } .widget__shares { प्रदर्शन: कोई नहीं; } .singleAuthorPost .social-author__avtar { प्रदर्शन: कोई नहीं; } .lead_post_share_social .posts-custom .social-author__name, .lead_post_share_social .posts-custom .social-date { प्रदर्शन: इनलाइन; } .lead_post_share_social .posts-custom .social-date { मार्जिन-लेफ्ट: 5px; } .lead_post_share_social .posts-custom .social-date:before { content: “|”; प्रदर्शन: इनलाइन; रंग: var(–ग्रे); मार्जिन-राइट: 5px; } .singleAuthorPost .rm-col-center { मार्जिन-बॉटम: 10px; } .lead_post_tags_seo {मार्जिन-बॉटम: 50px; } .creative_common_work { पैडिंग-बॉटम: 15px; मार्जिन-बॉटम: 20px; } .tags .tags__item { डिस्प्ले: इनलाइन-ब्लॉक; संरेखित-आइटम: केंद्र; पैडिंग: 0 16px; चौड़ाई: ऑटो; ऊंचाई: 35px; पृष्ठभूमि: #ईईई; सीमा-त्रिज्या: 35px; रंग: #000; लाइन-ऊंचाई: 35px; फ़ॉन्ट-फ़ैमिली: “लोरा”, सैन्स-सेरिफ़; फ़ॉन्ट-शैली: सामान्य; फ़ॉन्ट-भार: 400; फ़ॉन्ट-आकार: 12px; पाठ-संरेखण: केंद्र; पाठ-रूपांतरण: पूंजीकरण; बॉक्स-आकार: बॉर्डर-बॉक्स; मार्जिन: 0 8पीएक्स 15पीएक्स 0; पाठ-सजावट: कोई नहीं; } .कस्टम-फील्ड-बाद-सेकंड, .कस्टम-फील्ड-पॉपअप-बीजी-रंग, .कस्टम-फील्ड-पॉपअप-टेक्स्ट-रंग, .कस्टम-फील्ड-स्थान, .सभी-संबंधित-अनुभाग { प्रदर्शन: कोई नहीं; } h1 {फ़ॉन्ट-आकार: 34px; } h2 {फ़ॉन्ट-आकार: 20px; “}); } }, 200) }); }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ if (getCookie(“popupShown”) || (getCookie(“hide_newsletter”) != null && getCookie(“hide_newsletter”))) { console.log(“कुछ नहीं करना है”); setCookie(“hide_newsletter”, “true”, 365); return; } if(document.querySelector(“।popup-modal .mb-2.popup–article #mc-embedded-subscribe”) != null) { const पॉपअपफॉर्म = document.querySelector(“।popup-modal [name=’mc-embedded-subscribe-form’]”); .mb-2.popup–article #mc-embedded-subscribe”).addEventListener(“click”, function(){// “hide_newsletter” कुकी को 1 साल (365 दिन) के लिए “true” पर सेट करें setCookie(“hide_newsletter”, “true”, 365); });*/ } const PopupBackdrop = document.querySelector(‘पॉपअप–बैकड्रॉप’); const क्लोज़पॉपअपबटन = पॉपअपबैकड्रॉप.querySelector(‘close-button’); constafterSecondsField = पॉपअपबैकड्रॉप.querySelector(‘.custom-field-after-sends’ )?.textContent; “.कस्टम-फ़ील्ड-स्क्रॉलिंग-शुरू होता है” )?.textContent; const CustomFieldObj = document.querySelector(“popup–article .custom-field-visible-to-admin-only”); const CustomBGColor = PopupBackdrop.querySelector(‘.custom-field-popup-bg-color’)?.textContent const CustomTextColor = PopupBackdrop.querySelector(‘.custom-field-popup-text-color’)?.textContent PopupBackdrop.style.setProperty(‘–background-color’, `${customBGColor}`) PopupBackdrop.style.setProperty(‘–text-color’, `${customTextColor}`) const After_sensitive = नंबर (आफ्टरसेकंड्सफिल्ड); कास्ट स्क्रॉलिंग_बीगिन्स = स्क्रॉलिंगफील्ड === “ट्रू”; लेट यूजरहैसइंटरैक्टेड = फॉल्स; कॉन्स्ट स्क्रॉलडेल्टाथ्रेशोल्ड = () => { कंसोल.लॉग(“—- शोपॉप —-“) यदि ((कस्टमफिल्डओबीजे != getCookie(“userIsAdmin”)) || CustomFieldObj == null) && !getCookie(“popupShown”) ){popupBackdrop.classList.add(“open”); setCookie(“popupShown”, true, 30); } }; if(closePopupButton != null) {closePopupButton.addEventListener(“click”,hidPopup } const userEvents = [“mousemove”, “mousedown”, “keydown”, “touchstart”]; चलो userEventListenersRemoved = false; const userInteraction = () => { userHasInteracted = true; यदि (userEventListenersRemoved) वापसी; userEvents.forEach((event) => { document.removeEventListener(event, userInteraction); userEventListenersRemoved = true; }); }; userEvents.forEach((event) => document.addEventListener(event, userInteraction) ); यदि (!स्क्रॉलिंग_शुरू होती है && !isNaN(after_seasons)) { सेटटाइमआउट(showPopup, After_Seconds * 1000); } अन्यथा यदि (स्क्रॉलिंग_शुरू होता है) { document.addEventListener(“स्क्रॉल”, डिबाउंस(हैंडलस्क्रॉल, 50)); } फ़ंक्शन हैंडलस्क्रॉल() { कंसोल.लॉग(“—-हैंडल स्क्रॉल—-“) यदि (स्क्रॉलिंग_बीगिन्स && !userHasInteracted) रिटर्न; यदि (स्क्रॉलिंग_शुरू होता है) { स्थिरांक currentScrollPosition = window.scrollY || document.documentElement.scrollTop; कॉन्स्ट स्क्रॉलडेल्टा = Math.abs(currentScrollPosition – LastScrollPosition); यदि (स्क्रॉलडेल्टा > स्क्रॉलडेल्टा थ्रेशोल्ड) {सेटटाइमआउट(शोपॉपअप, 0); document.removeEventListener(“स्क्रॉल”, डिबाउंस(हैंडलस्क्रॉल, 50)); } LastScrollPosition = currentScrollPosition; } } फ़ंक्शन डिबाउंस (फ़ंक, प्रतीक्षा, तत्काल = गलत) { टाइमआउट होने दें; रिटर्न फ़ंक्शन (…आर्ग्स) { स्थिरांक संदर्भ = यह; बाद में स्थिरांक = फ़ंक्शन () { टाइमआउट = शून्य; यदि (!तत्काल) func.apply(संदर्भ, तर्क); }; स्थिरांक चाहिएCallNow = तत्काल && !समयबाह्य; क्लियरटाइमआउट(समयबाह्य); टाइमआउट = सेटटाइमआउट (बाद में, प्रतीक्षा करें); यदि (अभी कॉल करना चाहिए) func.apply(संदर्भ, तर्क); }; } // क्रियान्वित किया जाना है: कुकीज़ फ़ंक्शन सेटकुकी (नाम, मूल्य, दिन) { दिनांक दें = नई तिथि(); date.setTime(date.getTime() + दिन * 24 * 60 * 60 * 1000); लेट एक्सपायर = “एक्सपायर्स = ” + डेट.टूयूटीसीस्ट्रिंग(); दस्तावेज़.कुकी = नाम + “=” + मान + “;” + समाप्त हो रहा है + “;पथ=/”; } फ़ंक्शन getCookie(cname) {let name = cname + “=”; लेट डिकोडेडकुकी = डिकोडयूआरआईकंपोनेंट(डॉक्यूमेंट.कुकी); चलो ca = decodedCookie.split(“;”); के लिए (मान लीजिए i = 0; i प्रतिक्रिया.json()) .then(response =>{ रिप्लाईकाउंट = रिस्पॉन्स.पोस्ट_काउंट – 1; document.querySelector(‘.comment_round_button .comment_count’).textContent = रिप्लाईकाउंट; /* यह लाइन बिग डिस्कोर्स बटन में रिप्लाई काउंटर दिखाती है:: */ /* document.querySelector(‘.discourse-btn .btn’).textContent += ` (${replyCount})`; */ }); const commentsBtn = document.querySelector(‘.comment_round_button’); commentsBtn.addEventListener(‘click’, function(ev){ window.open(commentsBtn.dataset.link, ‘_blank’); }); /*document.querySelector(“।share-plus.js-toggle”). function(ele){ document.querySelector(”comment_round_button”).classList.toggle(‘hide-button });*/ }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ REBELMOUSE_STDLIB.createElementChangeListener(‘.lead_post_tags_seo .social-author__name’, function(el) { if(el.nextElementSiling && el.nextElementSiling.classList.contains(‘social-author__bio’)) { el.nextElementSiling.insertAdjacentHTML(‘afterend’, ‘
‘); } अन्य { el.insertAdjacentHTML(‘afterend’, ‘
‘); } }); }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){ REBELMOUSE_STDLIB.createElementChangeListener(‘newsletter-campaign .custom-field-source-text’, function(button){Button.setAttribute(‘data-before’, ”); बटन.इनरHTML=”; }) }); window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){/* पोस्ट कस्टम फ़ील्ड के साथ सेट की गई स्थिति की जांच करना, यदि यह डिफ़ॉल्ट नहीं है (ऊपर) – स्थिति को कस्टम में बदलें */ const ब्लॉकप्लेसमेंट = () => { const newsletterBlock = document.querySelector(‘.js-newsletter-wrapper’); const प्लेसमेंटPosition = document.querySelector(‘.custom-field-newsletter-position’) ? document.querySelector(‘.custom-field-newsletter-position’).innerText : false; if (!placementPosition) { return newsletterBlock.classList.remove(‘visually-hidden’); === ‘उपरोक्त’ ||. प्लेसमेंटस्थिति === ” ? गलत : targetBlock.insertAdjacentElement(‘afterend’, newsletterBlock); {
const articleElement = entry.target;
console.log(‘boost_viewable’, articleElement)
const boosted_page = articleElement.querySelector(
“a.widget__headline-text”
).href;
gtag(“event”, “boost_viewable”, {
boosted_page: boosted_page,
});
},
});
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
const breakingNewsTop = document.querySelector(
“.breaking-news-top-wrapper .breaking-news-top”
);
function checkCustomField() {
if (breakingNewsTop.children.length > 0) {
let customFieldObj = breakingNewsTop.querySelector(
“.custom-field-visible-to-admin-only”
);
if (
!getCookie(“userIsAdmin”) &&
customFieldObj &&
customFieldObj.innerHTML == “True”
) {
document.querySelector(“.breaking-news-top-wrapper”).style.display =
“none”;
document.body.classList.remove(“expanded-header”);
document.body.classList.remove(“collapsed-header”);
} else {
document
.querySelector(“.breaking-news-top-wrapper.journey-unit”)
.classList.remove(“hidden”);
}
}
}
checkCustomField();
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
console.log(‘You are in the CWV BTEST’);
let breakingNewsHeight = 0;
function isMobile() {
return /Mobi|Android|iPhone|iPod|BlackBerry|Opera Mini|IEMobile|WPDesktop/i.test(navigator.userAgent);
}
function isIpadByWidth() {
const width = window.innerWidth;
const height = window.innerHeight;
// Common iPad viewport widths in portrait & landscape
const ipadWidths = [810, 820, 834, 1024, 1138, 1180, 1366];
return ipadWidths.includes(width) || ipadWidths.includes(height) || window.innerWidth > 767;
}
if (isIpadByWidth()) {
console.log(‘User is likely on an iPad’);
}
window.scroll_distance = 0;
window.scroll_up = false;
window.max_scroll = 0;
const documentBody = document.body;
const payWallWrapper = document.getElementsByClassName(‘paywall-bar__wrapper’)[0];
const breakingNewsWrapper = document.querySelector(‘.breaking-news-top-wrapper’);
const breakingNewsTop = document.querySelector(‘.breaking-news-top-wrapper .breaking-news-top’);
const customFieldObj = breakingNewsTop.querySelector(‘.custom-field-visible-to-admin-only’);
const customFieldMobileObj = breakingNewsTop.querySelector(‘.custom-field-cta-visible-mobile’);
const payWallCaret = document.querySelector(‘#paywall-bar__caret’);
function setSessionCookie(name, value) {
document.cookie = name + ‘=’ + encodeURIComponent(value) + ‘; path=/’;
}
if (breakingNewsTop.children.length > 0) {
payWallCaret.classList.remove(‘hidden’);
if (!getCookieValue(‘userIsAdmin’) && customFieldObj && customFieldObj.innerHTML == ‘True’) {
deleteCookie(‘superHeader’);
documentBody.classList.remove(‘collapsed-header’);
documentBody.classList.remove(‘expanded-header’);
}
if (getCookieValue(‘superHeader’) == ‘collapsed’) {
payWallWrapper.classList.add(‘paywall-bar__collapsed’);
payWallWrapper.classList.remove(‘paywall-bar__expanded’);
documentBody.classList.add(‘collapsed-header’);
documentBody.classList.remove(‘expanded-header’);
} else {
payWallWrapper.classList.add(‘paywall-bar__expanded’);
payWallWrapper.classList.remove(‘paywall-bar__collapsed’);
documentBody.classList.remove(‘collapsed-header’);
documentBody.classList.add(‘expanded-header’);
}
setTimeout(function () {
window.scrollTo(0, 0);
}, 500);
}
function deleteCookie(name) {
document.cookie = name + “=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;”;
}
function getCookieValue(name) {
// Split the document.cookie string into individual cookies
let cookies = document.cookie.split(‘;’);
// Loop through the cookies to find the one with the specified name
for (let i = 0; i breakingNewsHeight + 150 && breakingNewsHeight >= 0) {
documentBody.classList.add(‘fixed-nav’);
if (breakingNewsTop.children.length > 0) {
if (!getCookieValue(‘userIsAdmin’) && customFieldObj && customFieldObj.innerHTML == ‘True’) {
deleteCookie(‘superHeader’);
documentBody.classList.remove(‘collapsed-header’);
documentBody.classList.remove(‘expanded-header’);
} else if (!isIpadByWidth() && isMobile() && customFieldMobileObj == null) {
deleteCookie(‘superHeader’);
documentBody.classList.remove(‘collapsed-header’);
documentBody.classList.remove(‘expanded-header’);
} else {
setSessionCookie(‘superHeader’, ‘collapsed’);
documentBody.classList.add(‘collapsed-header’);
documentBody.classList.remove(‘expanded-header’);
payWallWrapper.classList.add(‘paywall-bar__collapsed’);
payWallWrapper.classList.remove(‘paywall-bar__expanded’);
}
}
if (window.scrollY > window.scroll_distance) {
window.scroll_up = false;
} else {
if (window.scrollY > window.scroll_distance – 20) {
window.scroll_up = true;
documentBody.classList.remove(‘scroll-down’);
documentBody.classList.add(‘scroll-up’);
// console.log( “scrolling up” );
} else {
// console.log( “scrolling in the between” );
}
}
} else {
documentBody.classList.remove(‘fixed-nav’);
documentBody.classList.remove(‘scroll-down’);
documentBody.classList.remove(‘scroll-up’);
}
window.scroll_distance = window.scrollY;
}
function debounce(fun, time) {
var timeout = null;
function execute() {
timeout = null;
fun();
}
return function debouncedFun() {
if (timeout) {
return;
}
timeout = setTimeout(execute, time);
};
}
let previousHeight = breakingNewsWrapper.offsetHeight;
const resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
if (entry.contentRect.height !== previousHeight) {
//console.log(“The height of the element has changed.”);
previousHeight = entry.contentRect.height;
breakingNewsHeight = previousHeight;
resizeObserver.disconnect();
}
}
});
resizeObserver.observe(breakingNewsWrapper);
window.addEventListener(‘scroll’, debounce(onScroll, 50), {
passive: true,
});
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
//
(function(w,d,s,n,a){if(!w[n]){var l=’call,catch,on,once,set,then,track’
.split(‘,’),i,o=function(n){return’function’==typeof n?o.l.push([arguments])&&o
:function(){return o.l.push([n,arguments])&&o}},t=d.getElementsByTagName(s)[0],
j=d.createElement(s);j.async=!0;j.src=’https://cdn.fundraiseup.com/widget/’+a;
t.parentNode.insertBefore(j,t);o.s=Date.now();o.v=4;o.h=w.location.href;o.l=[];
for(i=0;i<7;i++)o[l[i]]=o(l[i]);w[n]=o}
})(window,document,'script','FundraiseUp','ANRLZVWL');
//
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
//ChangeListener(‘.custom-dbox-popupz, .donate_round_button’, function(el){el.addEventListener(“click”, function(){document.querySelector(‘.modal_donor’).style.display=’block’;})});
ChangeListener(‘.all-related-sections a’, function(el){
console.log(el.innerText);
if(el.innerText == ‘Source’) {
document.querySelector(‘.creative_common_work’).classList.add(‘actz’);
}
});
ChangeListener(‘.lead_post_share_social’, function (el) {
let social_date = el.querySelector(‘.social-date’).outerHTML;
el.querySelector(‘.social-date’).remove();
el.querySelector(‘.social-author’).insertAdjacentHTML(‘beforeend’,social_date);
});
document.querySelectorAll(‘p’).forEach(p => {
if (p.innerHTML.trim() === ‘
‘) {
p.remove();
}
});
ChangeListener(‘.lead_post_body_main .share-pinterest, .mobile_social_links .share-pinterest’, function(el) {
el.setAttribute(‘href’,’javascript:window.print();’);
el.querySelector(‘i’).classList.remove(‘fa-pinterest’);
el.querySelector(‘i’).classList.add(‘fa-print’);
el.setAttribute(‘data-track-share’,’Print’);
el.setAttribute(‘aria-label’,’Print Page’);
el.insertAdjacentHTML(‘afterend’, ‘
});
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
window.postContentParent = document.querySelector(‘.lead_post_post_body .body-description’);
window.postContentParent.querySelectorAll(“.pull-quote”).forEach(currentPl => {
currentPl.classList.add(“trinity-skip-it”);
});
var encodedURI = encodeURI(‘https://www.commondreams.org/news/trump-iran-war-imminent’);
var trinityNode = document.createElement(‘script’);
trinityNode.src = ‘https://trinitymedia.ai/player/trinity/2900021701/?pageURL=’ + encodedURI;
if (window.postContentParent) {
window.postContentParent.prepend(trinityNode);
}
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
var parentDiv = document.querySelector(‘.lead_post_body .body .body-description’);
var isListiclePost = parentDiv.querySelector(“.rebellt-item”);
var recircUnit2 = document.querySelector(“.recirculation-post2”);
if(isListiclePost != undefined) {
parentDiv.insertBefore(recircUnit2, parentDiv.querySelectorAll(“.rebellt-item”)[3]);
document.querySelector(“.recirculation-post2”).classList.remove(“hidden”);
} else {
// Find the second paragraph
var paragraphs = parentDiv.getElementsByTagName(‘p’);
if(paragraphs.length > 2) {
// Insert the player div after the second paragraph
parentDiv.insertBefore(recircUnit2, paragraphs[2]);
} else {
parentDiv.insertBefore(recircUnit2, paragraphs[1]);
}
document.querySelector(“.recirculation-post2”).classList.remove(“hidden”);
}
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
if(document.querySelector(“.newsletter-and-social #mc-embedded-subscribe”) != null) {
const stickyform = document.querySelector(“.newsletter-and-social [name=’mc-embedded-subscribe-form’]”);
stickyform.addEventListener(“submit”, () => {
setCookie(“hide_newsletter”, “true”, 365);
});
stickyform.addEventListener(“click”, () => {
setCookie(“hide_newsletter”, “true”, 365);
});
}
const stringPortion = “Thank you for subscribing”;
const userMessage =
“You’re already subscribed, your profile has been updated. Thank you!”;
const expectedMessage = “You’re already subscribed. Thank you!”;
let target = document.querySelector(“.newsletter-and-social #mce-success-response”);
let observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
console.log(“CurrentText”,target.innerHTML);
if (
target.innerHTML === userMessage
) {
console.log(“text changed!!!”)
target.innerHTML = expectedMessage;
}
});
});
const config = { attributes: true, childList: true, characterData: true };
observer.observe(target, config);
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
/*
Checking the custom field for the form submit button text, if it is set – change the default one to custom
*/
const setCustomText = () => {
const customButtonText = document.querySelector(‘.custom-field-newsletter-button-text’) ? document.querySelector(‘.custom-field-newsletter-button-text’).innerText : false;
if (!customButtonText) {
return false;
}
const formButton = document.querySelector(‘.newsletter-wrapper .widget ._submit’);
let result;
if (formButton) {result = formButton.innerText = `${customButtonText}`;}
return result
}
setCustomText();
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
const controlElement = document.querySelector(‘.popup-control-wrapper .widget__subheadline-text p’);
let popupDelay;
if (controlElement) {
popupDelay = Number(controlElement.innerText) * 1e3;
}
if (popupDelay) {
const showDonateModal = () => {
const donateButton = document.querySelector(‘.custom-dbox-popupz’);
if (donateButton) {
donateButton.click();
return true
}
return false;
}
const startTimer = () => setTimeout(showDonateModal, popupDelay);
const checkCookie = () => {
const isDonateWindowClosed = localStorage.getItem(‘donateClosed’);
if (!isDonateWindowClosed) {
return startTimer();
}
const item = JSON.parse(isDonateWindowClosed);
const now = new Date();
if (now.getTime() > item.expiry) {
localStorage.removeItem(‘donateClosed’);
return startTimer();
}
}
checkCookie();
const setCookie = (key, ttl) => {
const now = new Date();
const item = {
value: true,
expiry: now.getTime() + 6000000,
};
return localStorage.setItem(‘donateClosed’, JSON.stringify(item));
}
const donateClose = document.querySelector(‘.modal_close’);
donateClose.addEventListener(‘click’, setCookie, false);
}
});
window.REBELMOUSE_LOWEST_TASKS_QUEUE.push(function(){
const addDonateButton = () => {
const campaignArticles = Array.from(document.querySelectorAll(‘.campaign-article’));
if (campaignArticles.length {
const widgetBody = article.querySelector(‘.widget__body’);
if (!widgetBody) {
return false;
}
const button = `




