domain is t.co cause then new posts // will not get an immediate verdict even if it has a dangerous link if (tag.href.indexOf('/t.co/') != -1) { // the tag's inner text may be truncated and end in the // unicode suspension character (i.e., ...) and it cannot // be used. if (tag.innerText.charCodeAt(tag.innerText.length-1) == 8230) { // older posts may not always have data-expanded-url var destUrl = tag.getAttribute('data-expanded-url'); if (!!destUrl) return destUrl; var finalUrl = searchshield.avgCallFunc(document, 'GetFinalUrl', tag.href); return finalUrl; } return searchshield.checkUrl(tag.innerText); } return tag.href; } return false;};searchshield.TwitterSearchEngine.prototype.addImage = function(node, image, hidden){ var doc = this.search.doc; this.init_inline_ratings(doc); this.show_inline_ratings(doc, node, image);};/////////////// TWITTER SEARCH ENGINE ////////////////////////////// GMAIL SEARCH ENGINE ///////////////searchshield.GMailSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.processFrames = true; this.showCleanVerdicts = false; this.type = 'inline';};searchshield.GMailSearchEngine.prototype = new searchshield.SearchEngine();searchshield.GMailSearchEngine.prototype.constructor = searchshield.GMailSearchEngine;searchshield.GMailSearchEngine.prototype.name = "gmail"; // the name by which the search engine is known (always lowercase)searchshield.GMailSearchEngine.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; var domain = uri.host; // re stitch the uri path and query elements to // use existing logic var path = uri.path + uri.delimiter + uri.query; if ((domain.indexOf("mail.google.") != -1) || (domain.indexOf("gmail.") != -1)) { return 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 (searchshield.DoesURLContain(tag.href, this.search.uri.host) || searchshield.DoesURLContain(tag.href, 'ak.fbcdn.net')) { 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;