by which the search engine is known (always lowercase)searchshield.FacebookSearchEngine.prototype.validSearch = function(href){ var uri; if (typeof(this.search) === 'undefined' || null === this.search) uri = searchshield.parseLink(href); else uri = this.search.uri; if(!uri || !uri.host) return false; if (uri.host.indexOf("www.facebook.com") != -1) return true; return false;};searchshield.FacebookSearchEngine.prototype.includeLink = function(tag){ if (searchshield.DoesURLContain(tag.href, this.search.uri.host) || (searchshield.DoesURLContain(tag.href, 'static.ak.fbcdn.net'))) { return false; } // don't put verdicts in areas where typing is going on if (tag.parentNode) { var parentDiv = searchshield.getParentNodeByTagName("DIV", tag, "className"); if (parentDiv && (parentDiv.className == "Mentions_Input") || (parentDiv.className.indexOf('UIThumbPager_') != -1)) { return false; } } return tag.href};searchshield.FacebookSearchEngine.prototype.addImage = function(node, image, hidden){ var doc = this.search.doc; this.init_inline_ratings(doc); this.show_inline_ratings(doc, node, image);};/////////////// FACEBOOK SEARCH ENGINE ////////////////////////////// AVG TOOLBAR REPORTING ///////////////var avgreport = { BLOCK_SEVERITY: 3, scanResult: function (doc, url, foundUrl, ip) { // report scan end only if surf enabled if ('1' != searchshield.avgCallFunc(doc, 'GetSurfEnabled')) return; // for now native is handling the interstitial var results = searchshield.avgCallFunc(doc, 'MalsiteCheck', url); if ( results == null ) return; var parts = results.split('::'); // need at least severity if (parts == null) return; if (!ip) ip = ""; // use a block severity if foundUrl is given var severity = !!foundUrl ? avgreport.BLOCK_SEVERITY : parseInt(parts[0], 10); var category = ""; var threat = ""; // fill in the category and threat if something was found if (severity > 0) { category = parts[2]; threat = parts[4]; }// else// return; var scan_result = searchshield.avgCallFunc(doc, 'ReportScanResult', url, url, threat, category, ip, severity); var scan_end = avgreport.scanEnd(doc, url); return (scan_result && scan_end); }, scanEnd: function (doc, url) { return searchshield.avgCallFunc(doc, 'ReportScanEnd', url); }, GetInterstitialIP: function (interstitial) { // simple regex to pull the IP address var regex = /(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)\.(([1-9][0-9]{0,2})|0)/; var match = regex.exec(interstitial); if (!match) return ''; return match[0]; }}/////////////// AVG TOOLBAR REPORTING ////////////////////////////// FLYOVERS ///////////////var avglsflyover = { count: 0, poppedUp: false, poppedElement: null, orig_onmousemove: null, reset: function () { avglsflyover.count = 0; avglsflyover.poppedUp = false; avglsflyover.poppedElement = null; avglsflyover.orig_onmousemove = null; }, popup: function (event, hash, search, flyover) { if (!event) event = window.event; var div = document.getElementById("XPLSS_Flyover"); if (div == null) return; // establish target element and get its containing document object // in case verdict is inside a frame var eventTarget = event.srcElement || event.currentTarget; var frameDoc = eventTarget.ownerDocument; // if the element is the clock, don't pop over it if ((eventTarget.src != null) && (eventTarget.src.indexOf("clock.gif") != -1)) return; // save the element we popped over avglsflyover.poppedElement = eventTarget; // if no flyover get it if ((flyover == null) || (flyover == "")) { flyover = searchshield.avgCallFunc(frameDoc, 'BuildFlyover', hash); if (!flyover) return; // cleanup flyover, replace any new lines flyover = flyover.replace(/\r/g, ""); flyover = flyover.replace(/\n/g, ""); // escape any single quotes flyover = flyover.replace(/'/g, "'"); } // set the html in the layer div.innerHTML = flyover; // there is an unwanted text node that causes vertical misalignment of flyover if (div.firstChild.nodeType == 3) div.removeChild(div.firstChild); avglsflyover.poppedUp = true; // reset display count avglsflyover.count = 0; div.onmouseout = avglsflyover.hide; // if an onmousemove is already set and it isn't us, save it and restore later if ((frameDoc.onmousemove != null) && (frameDoc.onmousemove != avglsflyover.position)) avglsflyover.orig_onmousemove