`
const PAYWALL_HTML2 = `

`.trim();
const PAYWALL_HTML3 = `

`
const PAYWALL_HTML4 = “
function ensureCss() {
if (!document.head) return;

const existing = document.querySelector(‘link[data-paywall-css=”1″]’);
if (existing) return;

const link = document.createElement(‘link’);
link.rel = ‘stylesheet’;
link.type = ‘text/css’;
link.href = CSS_HREF;
link.setAttribute(‘data-paywall-css’, ‘1’);
document.head.appendChild(link);
}

function hasSubInfo(el) {
// Only replace once the widget already contains .subInfo
return !!(el && el.querySelector(‘.subInfo’));
}

function applyTo(el) {
if (!el || el.dataset.paywallReplaced === ‘1’) return;
if (!hasSubInfo(el)) return; //



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here