true; } return false;};searchshield.GMailSearchEngine.prototype.includeLink = function(tag){ if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) return false; // don't mark anything but http:// if (tag.href.indexOf("mailto") == 0) return false; var parentDiv = searchshield.getParentNodeByTagName("DIV", tag, "className"); if ((parentDiv) && ((parentDiv.className == "ii gt") || // mail message body (parentDiv.className == "mv") || // top sponsored links (parentDiv.className == "vb") || // right sponsored links (parentDiv.className == "im") || // inside quotes (parentDiv.className == "gmail_quote") || // quote (parentDiv.className == "msg") // basic html mode )) // right ads { // parse for any ads var newHref = this.parseAdUrl(tag.href); return newHref; } return false;};searchshield.GMailSearchEngine.prototype.addImage = function(node, image, hidden){ var doc = this.search.doc; this.init_inline_ratings(doc); this.show_inline_ratings(doc, node, image);};searchshield.GMailSearchEngine.prototype.parseAdUrl = function(href){ if (!href) return href; // check for google ad var regex = "^http(s)?\:\/\/([a-zA-Z0-9]+)\.googlesyndication\.com.+\&adurl\=(.+)"; var re = new 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