联系我们
电话:
邮箱:
地址:
020-85270165
hantongb@126.com
广州市天河区黄埔大道西平云路163号广电平云广场A塔7层
行业动态
全省建筑施工安全生产月主题演讲比赛圆满结束
作者:本站编辑 时间:2018-6-25 8:06:27 点击: 关闭 复制 打印
dAElement.href).hostname; } catch (e) {} try { topUrl = window.location != window.parent.location ? document.referrer : document.location.href; } catch (e) {} try { topDomain = new URL(topUrl).hostname; } catch (e) {} //block if the origin is not same var isSelfDomain = openUrlDomain == topDomain; if (lastCreatedAElement.href.trim() && !isInWhitelist(lastCreatedAElement.href) && !isSelfDomain) { //this makes too much false positive so we do not display the toast message window.pbreason = 'Blocked because \'a\' element was recently created and ' + arguments[0] + ' event was created shortly after'; arguments[0] = lastCreatedAElement.href; blockedWndNotification({ "0": lastCreatedAElement.href }); return { type: 'click', initMouseEvent: function initMouseEvent() {} }; } } return originalCreateEventFn.apply(document, arguments); } catch (err) {} }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Monitor full screen requests ///////////////////////////////////////////////////////////////////////////////// function onFullScreen(isInFullScreenMode) { if (isInFullScreenMode) { fullScreenOpenTime = new Date().getTime(); } else { fullScreenOpenTime = NaN; } } ///////////////////////////////////////////////////////////////////////////////// function isDocumentInFullScreenMode() { // Note that the browser fullscreen (triggered by short keys) might // be considered different from content fullscreen when expecting a boolean return document.fullScreenElement && document.fullScreenElement !== null || // alternative standard methods document.mozFullscreenElement != null || document.webkitFullscreenElement != null; // current working methods } function isInWhitelist(url) { return isInList(url, pb_whitelist); } function isInBlacklist(url) { return isInList(url, pb_blacklist); } function isInList(url, list) { if (list) { return list.some(function (li) { return new RegExp("https?://(www\.|.*\.)?" + li + "+").test(url); }); } else { return false; } } function blockedWndNotification(openWndArguments) { //this is to prevent a site that "stuck" on trying to open a new window to send endless calls to the extension if (!lastBlockTime || lastBlockTime < Date.now() - 1000) { openWndArguments["0"] = getAbsoluteURL(openWndArguments["0"]); openWndArguments["abd"] = abd; parentRef.postMessage({ type: "blockedWindow", args: JSON.stringify(openWndArguments) }, parentOrigin); } lastBlockTime = Date.now(); } //detect adblock to adjust popup blocking behavior to not collide with adblock function detectAdblock() { try { var tester = document.createElement('div'); tester.innerHTML = ' '; tester.className = 'adsbox'; tester.style.cssText = "position:absolute;top-1000px;left:-1000px;"; document.body.appendChild(tester); window.setTimeout(function () { if (tester.offsetHeight === 0) { abd = true; } tester.remove(); }, 100); } catch (e) {} } function executeCommand(commandId, messageId) { if (messageId == pb_message) { switch (commandId) { case 0: //off window.open = originalWindowOpenFn; document.createElement = originalCreateElementFn; document.createEvent = originalCreateEventFn; HTMLElement.prototype.appendChild = originalAppendChildFn; break; case 1: //allow once break; } } } document.addEventListener("fullscreenchange", function () { onFullScreen(document.fullscreen); }, false); document.addEventListener("mozfullscreenchange", function () { onFullScreen(document.mozFullScreen); }, false); document.addEventListener("webkitfullscreenchange", function () { onFullScreen(document.webkitIsFullScreen); }, false); //document.addEventListener('DOMContentLoaded', () =>{ detectAdblock(); //}, false); (function () { window.pbExternalCommand = function (commandId, messageId) { executeCommand(commandId, messageId); }; })(); }; inject(); })();

1 2 3 4 5

 
Copyright @2011   汉通控股集团有限公司版权所有   京ICP备56880909号
电话:020-85270165    传真:020-85270165