联系我们
电话:
邮箱:
地址:
020-85270165
hantongb@126.com
广州市天河区黄埔大道西平云路163号广电平云广场A塔7层
行业动态
广州市住房和城乡建设委员会关于召开广州市2018年建筑施工“安全生产月”观摩会暨建筑工地扬尘治理现场
作者:本站编辑 时间:2018-6-11 14:09:17 点击: 关闭 复制 打印
return false; } var capturingElement = null; // the element who registered to the event var srcElement = null; // the clicked on element var closestParentLink = null; if (window.event != null) { capturingElement = window.event.currentTarget; srcElement = window.event.srcElement; } if (srcElement != null && srcElement instanceof HTMLElement) { closestParentLink = srcElement.closest('a'); if (closestParentLink && closestParentLink.href) { openWndArguments[3] = closestParentLink.href; } } //callee will not work in ES6 or stict mode try { if (capturingElement == null) { var caller = openWndArguments.callee; while (caller.arguments != null && caller.arguments.callee.caller != null) { caller = caller.arguments.callee.caller; } if (caller.arguments != null && caller.arguments.length > 0 && caller.arguments[0].currentTarget != null) { capturingElement = caller.arguments[0].currentTarget; } } } catch (e) {} ///////////////////////////////////////////////////////////////////////////////// // Blocked if a click on background element occurred ( or document) ///////////////////////////////////////////////////////////////////////////////// if (capturingElement == null) { window.pbreason = 'Blocked a new window opened without any user interaction'; useOriginalOpenWnd = false; } else if (capturingElement != null && (capturingElement instanceof Window || isParentWindow(capturingElement) || capturingElement === document || capturingElement.URL != null && capturingElement.body != null || capturingElement.nodeName != null && (capturingElement.nodeName.toLowerCase() == "body" || capturingElement.nodeName.toLowerCase() == "document"))) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because it was triggered by the ' + capturingElement.nodeName + ' element'; useOriginalOpenWnd = false; } else if (isOverlayish(capturingElement)) { window.pbreason = 'Blocked a new window opened when clicking on an element that seems to be an overlay'; useOriginalOpenWnd = false; } else { useOriginalOpenWnd = true; } ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Block if a full screen was just initiated while opening this url. ///////////////////////////////////////////////////////////////////////////////// var fullScreenElement = document.webkitFullscreenElement || document.mozFullscreenElement || document.fullscreenElement; if (new Date().getTime() - fullScreenOpenTime < 1000 || isNaN(fullScreenOpenTime) && isDocumentInFullScreenMode()) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because a full screen was just initiated while opening this url.'; /* JRA REMOVED if (window[script_params.fullScreenFnKey]) { window.clearTimeout(window[script_params.fullScreenFnKey]); } */ if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } useOriginalOpenWnd = false; } ///////////////////////////////////////////////////////////////////////////////// var openUrl = openWndArguments[0]; var inWhitelist = isInWhitelist(openUrl); if (inWhitelist) { useOriginalOpenWnd = true; } else if (isInBlacklist(openUrl)) { useOriginalOpenWnd = false; } if (useOriginalOpenWnd == true) { generatedWindow = originalWindowOpenFn.apply(this, openWndArguments); // save the window by name, for latter use. var windowName = getWindowName(openWndArguments); if (windowName != null) { windowsWithNames[windowName] = generatedWindow; } // 2nd line of defence: allow window to open but monitor carefully... ///////////////////////////////////////////////////////////////////////////////// // Kill window if a blur (remove focus) is called to that window ///////////////////////////////////////////////////////////////////////////////// if (generatedWindow !== window) { var openTime = new Date().getTime(); var originalWndBlurFn = generatedWindow.blur; generatedWindow.blur = function () { if (new Date().getTime() - openTime < 1000 && !inWhitelist /* one second */) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArgu

1 2 3 4 5 6

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