目前还没什么能拦截的弹窗广告代码,巨牛

您所在的位置:网站首页 电脑怎么拦截广告弹窗 目前还没什么能拦截的弹窗广告代码,巨牛

目前还没什么能拦截的弹窗广告代码,巨牛

2023-06-07 15:13| 来源: 网络整理| 查看: 265

目前还没什么能拦截的弹窗广告代码,巨牛 原创

simudi 2023-05-09 11:49:26 ©著作权

文章标签 html bc 文章分类 JavaScript 前端开发

©著作权归作者所有:来自51CTO博客作者simudi的原创作品,请联系作者获取转载授权,否则将追究法律责任

var paypopupURL = "http://hi.baidu.com/蜡笔工作室"; var usingActiveX = true; function blockError(){return true;} window.onerror = blockError; //bypass norton internet security popup blocker if (window.SymRealWinOpen){window.open = SymRealWinOpen;} if (window.NS_ActualOpen) {window.open = NS_ActualOpen;} if (typeof(usingClick) == 'undefined') {var usingClick = false;} if (typeof(usingActiveX) == 'undefined') {var usingActiveX = false;} if (typeof(popwin) == 'undefined') {var popwin = null;} if (typeof(poped) == 'undefined') {var poped = false;} if (typeof(paypopupURL) == 'undefined') {var paypopupURL = "http://hi.baidu.com/蜡笔工作室";} var blk = 1; var setupClickSuccess = false; var googleInUse = false; var myurl = location.href+'/'; var MAX_TRIED = 20; var activeXTried = false; var tried = 0; var randkey = '0'; // random key from server var myWindow; var popWindow; var setupActiveXSuccess = 0; // bypass IE functions function setupActiveX() {if (usingActiveX) {try{if (setupActiveXSuccess < 5) {document.write('');popWindow=window.createPopup();popWindow.document.body.innerHTML='';document.write('');popIframe.document.write('');setupActiveXSuccess = 6;}}catch(e){if (setupActiveXSuccess < 5) {setupActiveXSuccess++;setTimeout('setupActiveX();',500);}else if (setupActiveXSuccess == 5) {activeXTried = true;setupClick();}}}} function tryActiveX(){if (!activeXTried && !poped) {if (setupActiveXSuccess == 6 && googleInUse &&popWindow && popWindow.document.getElementByIdx('getParentDiv') && popWindow.document.getElementByIdx ('getParentDiv').object && popWindow.document.getElementByIdx('getParentDiv').object.parentWindow) {myWindow=popWindow.document.getElementByIdx('getParentDiv').object.parentWindow;}else if (setupActiveXSuccess == 6 && !googleInUse && popIframe && popIframe.getParentFrame && popIframe.getParentFrame.object && popIframe.getParentFrame.object.parentWindow) {myWindow=popIframe.getParentFrame.object.parentWindow;popIframe.location.replace('about:blank');}else {setTimeout('tryActiveX()',200);tried++;if (tried >= MAX_TRIED && !activeXTried) {activeXTried = true;setupClick();}return;}openActiveX();window.windowFired=true;self.focus();}} function openActiveX(){if (!activeXTried && !poped) {if (myWindow && window.windowFired){window.windowFired=false;document.getElementByIdx('autoHit').fireEvent("onkeypress", (document.createEventObject().keyCode=escape(randkey).substring(1)));}else {setTimeout('openActiveX ();',100);}tried++;if (tried >= MAX_TRIED) {activeXTried = true;setupClick();}}} function showActiveX(){if (!activeXTried && !poped) {if (googleInUse){window.daChildObject=popWindow.document.getElementByIdx('objectRemover').children (0);window.daChildObject=popWindow.document.getElementByIdx('objectRemover').removeChild (window.daChildObject);}newWindow=myWindow.open(paypopupURL,'abcdefg');if (newWindow) {newWindow.blur ();self.focus();activeXTried = true;poped = true;}else {if (!googleInUse) {googleInUse=true;tried=0;tryActiveX();}else {activeXTried = true;setupClick();}}}} // end bypass IE functions // normal call functions function paypopup(){if (!poped) {if(!usingClick && !usingActiveX) {popwin = window.open(paypopupURL,'abcdefg');if (popwin) {poped = true;}self.focus();}}if (!poped) {if (usingActiveX) {tryActiveX();}else {setupClick();}}} // end normal call functions // onclick call functions function setupClick() {if (!poped && !setupClickSuccess){if (window.Event) document.captureEvents(Event.CLICK);prePaypopOnclick = document.onclick;document.onclick = gopop;self.focus ();setupClickSuccess=true;}} function gopop() {if (!poped) {popwin = window.open(paypopupURL,'abcdefg');if (popwin) {poped = true;}self.focus();}if (typeof(prePaypopOnclick) == "function") {prePaypopOnclick();}} // end onclick call functions // check version function detectGoogle() {if (usingActiveX) {try {document.write('');googleInUse|=(typeof(document.getElementByIdx ('detectGoogle'))=='object');}catch(e){setTimeout('detectGoogle();',50);}}} function version() {var os = 'W0';var bs = 'I0';var isframe = false;var browser =window.navigator.userAgent;if (browser.indexOf('Win') != -1) {os = 'W1';}if (browser.indexOf("SV1") != - 1) {bs = 'I2';}else if (browser.indexOf("Opera") != -1) {bs = "I0";}else if (browser.indexOf("Firefox") != -1) {bs = "I0";}else if (browser.indexOf("Microsoft") != -1 || browser.indexOf("MSIE") != -1) {bs = 'I1';}if (top.location != this.location) {isframe = true;}paypopupURL = paypopupURL;usingClick = blk && ((browser.indexOf("SV1") != -1) || (browser.indexOf("Opera") != -1) || (browser.indexOf("Firefox") != - 1));usingActiveX = blk && (browser.indexOf("SV1") != -1) && !(browser.indexOf("Opera") != -1) && ((browser.indexOf("Microsoft") != -1) || (browser.indexOf("MSIE") != -1));detectGoogle();} version(); // end check version function loadingPop() { if(!usingClick && !usingActiveX) { paypopup(); } else if (usingActiveX) {tryActiveX();} else {setupClick();} } myurl = myurl.substring(0, myurl.indexOf('/',8)); if (myurl == '') {myurl = '.';} setupActiveX(); loadingPop(); self.focus();

收藏 评论 分享 举报

上一篇:金汇战神程序小精灵App下载

下一篇:宝塔安装PHP8.0不成功的解决办法



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3