(domain.indexOf("yhs.search.yahoo.co") != -1) { if ((avg == "avg") && ((path.indexOf("search?") == 0) || (path.indexOf("search;") == 0))) { return true; } } // also support new metro version which DOESN'T // contain /avg so avg split part is path // valid domains are: // search.yahoo.com, // xx.search.yahoo.com and // search.yahoo.co.xx if (domain.indexOf("search.yahoo.co") != -1) { // path (split avg) must start with search and // contain the avg toolbar parameter if (((path.indexOf("search?") == 0) || (path.indexOf("search;") == 0)) && (path.indexOf("fr=yhs-avg") != -1)) { return true; } } return false;};searchshield.AVGYahooSearchEngine.prototype.includeLink = function(tag){ var href = ""; var outHref = ""; var findStr = ""; if (this.search.doc.body.className.toLowerCase() != "standard") { // handle as std Yahoo results page return searchshield.YahooSearchEngine.prototype.includeLink(tag); } // yahoo likes to encode the url href = unescape(tag.href); if (tag.target == "_top") { var da = href.indexOf("**"); if (da != -1) outHref = href.substring(da+2); else outHref = href ; if (outHref.toLowerCase().indexOf("overture.") !== -1) return false; } else if (!this.onlyPrimaries) { findStr = "&yargs="; var yargs = href.indexOf(findStr); if (yargs != -1) { outHref = href.substring(yargs+findStr.length); // check for prefix if (outHref.indexOf("://") == -1) outHref = "http://" + outHref; // if inside an , probably a paypal link, don't include if (tag.parentNode && (tag.parentNode.tagName == "I")) return false; } } // filter domains // split the url based on '/' var parts = outHref.split('/'); // Filter out domains that match any of the search engine's names if (!parts[2]) return false; var domain = parts[2]; if ((domain.indexOf("rdrjp.yahoo.com") != -1) || (domain.indexOf("rdrkrs.yahoo.com") != -1) || (domain.indexOf("rdrtpe.yahoo.com") != -1) || (domain.indexOf("rdrird.yahoo.com") != -1) || (domain.indexOf("rdrhk2.yahoo.com") != -1) || (domain.indexOf("rdrsg1.yahoo.com") != -1) || (domain.indexOf("rdrin2.yahoo.com") != -1) || (domain.indexOf("rdre1.yahoo.com") != -1) || (domain.indexOf("rdrw1.yahoo.com") != -1) ) { return false; } return outHref;};/////////////// AVG YAHOO SEARCH ENGINE ////////////////////////////// MSN SEARCH ENGINE ///////////////searchshield.MSNSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.onlyPrimaries = false;};searchshield.MSNSearchEngine.prototype = new searchshield.SearchEngine();searchshield.MSNSearchEngine.prototype.constructor = searchshield.MSNSearchEngine;searchshield.MSNSearchEngine.prototype.name = "msn";searchshield.MSNSearchEngine.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 hostMatch = 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; // For MSN the host must match: // search.msn.com OR // search.live.com if (domain.indexOf("search.msn.co") > -1) { if (domain.charAt(13) == 'm') hostMatch = true; else if ((domain.charAt(13) == '.') && (domain.length == 16)) hostMatch = true; } else if (domain.indexOf("search.live.co") > -1) { if (domain.charAt(14) == 'm') hostMatch = true; else if ((domain.charAt(14) == '.') && (domain.length == 17)) hostMatch = true; } if (hostMatch) { if (path.indexOf("results.aspx") == 0) return true; } return false;};searchshield.MSNSearchEngine.prototype.includeLink = function(tag){ var outHref = false; // these don't seem common from Firefox, but they are in IE if (searchshield.DoesURLContain(tag.href, "g.msn.co")) { var qPos = tag.href.indexOf("?"); if (qPos != -1) { var postPart = tag.href.substring(qPos+1); var dblAmp = postPart.indexOf("&&"); if (dblAmp != -1) { outHref = postPart.substring(0, dblAmp); return outHref; } } } else if (searchshield.DoesURLContain(tag.href, "r.msn.co")) { var element = tag; var parentNode = tag.parentNode; // top links - check for a CITE var