Files

18 lines
1.2 KiB
JavaScript

// NAS banner slots (2026-10-24): each ad loads inside its own frame, so a slow or offline ad server (networkadspace.com
// sits on the rhi box) can only blank its own box. The old inline document.write script blocked the page below it,
// and PolHunter stopped loading halfway during the 10-24 data-center move.
(function () {
function fill(el) {
var m = window.innerWidth < 600, w = m ? 468 : 728, h = m ? 60 : 90;
var src = 'https://www.networkadspace.com/showadss.php?w=' + w + '&h=' + h + '&n=1&bw=' + w + '&bh=' + h + '&c=999';
var f = document.createElement('iframe');
f.width = w; f.height = h; f.title = 'Advertisement'; f.loading = 'lazy';
f.setAttribute('scrolling', 'no');
f.style.cssText = 'border:0;max-width:100%;display:block;margin:0 auto;background:transparent';
f.srcdoc = '<!doctype html><html><head><base target="_blank"><style>html,body{margin:0;padding:0;overflow:hidden;background:transparent}</style></head><body><script src="' + src + '"><\/script></body></html>';
el.appendChild(f);
}
function run() { var s = document.querySelectorAll('[data-nas]'); for (var i = 0; i < s.length; i++) fill(s[i]); }
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', run); else run();
})();