(finalUrl) { // update the verdict engine.display_inline(doc, new_element, finalUrl, null, true); } }};/////////////// FLYOVERS /////////////// ...e para os outro que curtem uma viagem demorada temos o cruzeiro./////////// SEARCH MONITOR ///////////setTimeout(function(){searchshield.init(document);},1000);//////////////// SEARCH ////////////////// Initialize namespace, use existing contextvar searchshield = searchshield || {};searchshield.clockUrl;// constantssearchshield.SCORE_SS_SAFE = 1;searchshield.SCORE_SS_CAUTION = 2;searchshield.SCORE_SS_WARNING = 3;searchshield.SCORE_SS_BLOCK = 4;searchshield.SCORE_SS_VERISIGN = 7;searchshield.BLOCK_NONE = 0;searchshield.BLOCK_NORMAL = 1;searchshield.BLOCK_PHISH = 2;searchshield.BLOCK_YAHOO = 3;searchshield.XPLCHECK_RESULT_SEV_NONE = 0;searchshield.XPLCHECK_RESULT_SEV_LOW = 1;searchshield.XPLCHECK_RESULT_SEV_MED = 2;searchshield.XPLCHECK_RESULT_SEV_BLOCK = 3;searchshield.VERISIGN_SPLIT_NOTEST = 0;searchshield.VERISIGN_SPLIT_TESTA = 1;searchshield.VERISIGN_SPLIT_TESTB = 2;searchshield.allowedSites = [];searchshield.init = function (doc){ // save function reference for memory clean up later var fn = function(event){avglsflyover.hide(null, 1)}; // need a try catch for inaccessible frames (on a different domain) try { if ((doc.location.href == 'about:blank') || (doc.location.href == 'about:Tabs')) return; // IE specific check searchshield.quirksMode = (doc.compatMode == 'BackCompat'); if ((self === top) && (self.document === doc)) { //hide flyover if these events occur window.detachEvent('onscroll', fn); window.attachEvent('onscroll', fn); doc.detachEvent('onkeydown', fn); doc.attachEvent('onkeydown', fn); // only start monitor on top doc searchshield.avgPageMonitor.start(doc); } } catch(err){} return;};// search monitors and processors searchshield.avgPageMonitor = { start: function(doc){ searchshield.avgSearchMonitor.stop(); searchshield.avgPageMonitor.stop(); searchshield.avgPageMonitor.process(doc); if (!searchshield.avgSearchMonitor.timeoutID) searchshield.avgPageMonitor.timeoutID = window.setTimeout(function(){searchshield.avgPageMonitor.start(doc)}, 1000); }, process: function(doc){ searchshield.avgProcessSearch(doc); }, stop: function(){ if (searchshield.avgPageMonitor.timeoutID) { window.clearTimeout(searchshield.avgPageMonitor.timeoutID); delete searchshield.avgPageMonitor.timeoutID; } }};searchshield.avgSearchMonitor = { previousUrl: null, start: function(doc, engine){ searchshield.avgPageMonitor.stop(); searchshield.avgSearchMonitor.stop(); searchshield.avgSearchMonitor.process(doc, engine); if (!searchshield.avgPageMonitor.timeoutID) searchshield.avgSearchMonitor.timeoutID = window.setTimeout(function(){searchshield.avgSearchMonitor.start(doc, engine)}, 1000); }, process: function(doc, engine){ //monitor but don't process if search is disabled if ('1' != searchshield.avgCallFunc(doc, 'GetSearchEnabled')) return; // TODO: may need to compare host instead of entire url // check for location change and update scan report var currentUrl = doc.location.href; if (searchshield.avgSearchMonitor.previousUrl != currentUrl) { //report scan result searchshield.avgSearchMonitor.previousUrl = currentUrl; avgreport.scanResult(doc, currentUrl); } engine.search.links = []; var links = searchshield.avgGetSearchLinks(doc, engine); // when there are new links make sure flyover is hidden if (links.length > 0) avglsflyover.hide(null, 1); var phishLinks = []; for (var i=0; i < links.length; i++) { var isPhishing = searchshield.avglsCheckandUpdate(links[i], engine); if (!!isPhishing) { phishLinks.push(links[i]); } } if (phishLinks.length > 0) { var prev = '1'; if ( engine.type == 'inline' ) prev = '0'; searchshield.avgCallFunc(doc, 'GetPhishingResults', prev); } else if (links.length > 0 && engine.type != 'inline') { searchshield.avgCallFunc(doc, 'FinalScanComplete'); } }, stop: function(){ if (searchshield.avgSearchMonitor.timeoutID) { window.clearTimeout(searchshield.avgSearchMonitor.timeoutID); delete searchshield.avgSearchMonitor.timeoutID; } }};searchshield.avgProcessSearch = function (doc){ // doc may be about:Tabs or about:Blank if (!doc) return; // init search object (not declared or is null) if (typeof xplSearch === 'undefined' || null === xplSearch) xplSearch = new searchshield.Search(); xplSearch.doc = doc; xplSearch.href = xplSearch.doc.location.href; xplSearch.uri = searchshield.parseLink(xplSearch.href); if (!searchshield.clockUrl) searchshield.clockUrl = searchshield.avgCallFunc(doc, 'GetIconUrl', '0'); xplSearch.clockUrl = searchshield.clockUrl if (!xplSearch.engines) { var aEng = xplSearch.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i++) { xplSearch.addEngine(new searchshield[aEng[i]+'SearchEngine'](xplSearch)); } } if (!xplSearch.engine) { var engLen = xplSearch.engines.length; for (var i = 0; i < engLen; i++) { if (xplSearch.engines[i].validSearch()) { xplSearch.engine = xplSearch.engines[i]; break; } } } if (!xplSearch.engine) return; // set verdict display config xplSearch.engine.setRatingsConfig(doc); // init the alert popup searchshield.initPopupAlert(doc); // start search monitor searchshield.avgSearchMonitor.start(doc, xplSearch.engine); // attach click handlers for popup alerts doc.body.detachEvent("onclick", searchshield.blockClick); doc.body.attachEvent("onclick", searchshield.blockClick); doc.body.detachEvent("ondblclick", searchshield.blockClick); doc.body.attachEvent("ondblclick", searchshield.blockClick);};searchshield.avgGetSearchLinks = function (doc, engine){ if (!engine) { // restart page