RegExp(regex); var matches = href.match(re); if (matches && (matches.length >= 4)) { // else we want the fourth value var match = matches[3]; if (match && (match.length > 0)) return match } return href;};/////////////// GMAIL SEARCH ENGINE ////////////////////////////// FACEBOOK SEARCH ENGINE ///////////////searchshield.FacebookSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; this.type = 'inline';};searchshield.FacebookSearchEngine.prototype = new searchshield.SearchEngine();searchshield.FacebookSearchEngine.prototype.constructor = searchshield.FacebookSearchEngine;searchshield.FacebookSearchEngine.prototype.name = "facebook"; // the name 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 (!tag.href || (tag.href.indexOf('facebook.com') > -1) || (tag.href.indexOf('ak.fbcdn.net') > -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 ////////////////////////////// MYSPACE SEARCH ENGINE ///////////////searchshield.MySpaceSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; this.type = 'inline';};searchshield.MySpaceSearchEngine.prototype = new searchshield.SearchEngine();searchshield.MySpaceSearchEngine.prototype.constructor = searchshield.MySpaceSearchEngine;searchshield.MySpaceSearchEngine.prototype.name = "myspace"; // the name by which the search engine is known (always lowercase)searchshield.MySpaceSearchEngine.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.myspace.com") != -1) return true; return false;};searchshield.MySpaceSearchEngine.prototype.includeLink = function(tag){ // related domains do not get verdicts if (/myspace/.test(tag.hostname) || /myspace/.test(tag.href)) return false; if (/msplinks\.com/i.test(tag.href)) return searchshield.checkUrl(tag.innerText); return tag.href;};searchshield.MySpaceSearchEngine.prototype.addImage = function(node, image, hidden){ var doc = this.search.doc; this.init_inline_ratings(doc); this.show_inline_ratings(doc, node, image);};/////////////// MYSPACE 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, reset: function () { avglsflyover.count = 0; avglsflyover.poppedUp = false; avglsflyover.poppedElement = 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; 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;