1(function () { 2 var BlinkPaywall = window.BlinkPaywall || {status: 'disabled'}; 3 var htmlEl = document.getElementsByTagName( 'html' )[0]; 4 5 if ('enabled' !== BlinkPaywall.status || !window.blinkSDK) { 6 return 7 } 8 9 blinkSDK.setOptions({ 10 publisherDomainId: parseInt(BlinkPaywall.publisherId) 11 }); 12 13 blinkSDK.onAuthenticationChange(function (result) { 14 AAJPaywall.renderTemplates(); 15 16 if (BlinkPaywall.paymentInfo && !result.authenticated) { 17 showPaywall(); 18 requestPayment(); 19 } 20 }); 21 22 blinkSDK.onSubscriptionStatusChange(function (result) { 23 AAJPaywall.renderTemplates() 24 }); 25 26 if (BlinkPaywall.paymentInfo) { 27 if (window.blinkSDK.isInitialized()) { 28 requestPayment() 29 } else { 30 window.addEventListener('blinkPaywallInitialized', requestPayment) 31 } 32 } 33 34 function requestPayment() { 35 blinkSDK.requestPayment(BlinkPaywall.paymentInfo, hidePaywall, showPaywall) 36 } 37 38 function showPaywall() { 39 htmlEl.classList.remove('-blink-purchased'); 40 } 41 42 function hidePaywall() { 43 htmlEl.classList.add('-blink-purchased'); 44 } 45})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.