var baseNode; if (spnsdLinks.className.indexOf('ads horiz') > -1) // horizontal ads sections baseNode = tag.parentNode.parentNode; else baseNode = tag.parentNode; if (!baseNode || !baseNode.lastChild || baseNode.lastChild.tagName != 'EM') return false; var outHref = searchshield.removeHtmlTags(baseNode.lastChild.innerHTML); return outHref; } if ((tag.className.indexOf("yschttl") != -1) || (tag.className.indexOf("spt") != -1)) { var da = href.indexOf("**"); var ad = href.indexOf("*-"); if (da != -1) outHref = href.substring(da+2); else if (ad != -1) outHref = href.substring(ad+2); else outHref = href ; if ((outHref.indexOf('yahoo.com') != -1) || (outHref.toLowerCase().indexOf("overture.") !== -1)) return false; } else if ((tag.tagName) && (tag.tagName === "A") && (!tag.className)) { var tagParent = tag.parentNode; // if anchor without className then search parentNodes if ((tagParent) && (tagParent.tagName !== "EM") && (searchshield.getParentNodeByClassName("yst-web", tag, 4))) { // China Yahoo support outHref = href; } else if ((tagParent) && (tagParent.tagName === "H3") && (!!searchshield.getParentNodeById("WS2m",tag, 5))) { // Japan Yahoo support var da = href.indexOf("**"); if (da == -1) outHref = href; else outHref = href.substring(da+2); } else if ((tagParent) && (tagParent.className !== "c") && (tagParent.parentNode.id !== "fpn") && (!!searchshield.getParentNodeByClassName("ymc", tag, 7))) { // Korea Yahoo support - when not caught by yschttl var da = href.indexOf("**"); if (da !== -1) outHref = href.substring(da+2); } } 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 ? outHref.split('/') : null; // Filter out domains that match any of the search engine's names if (!parts || !parts[2]) return false; var domain = parts[2]; // no verdicts for links on yahoo.com domain if (/yahoo\.com/.test(domain)) return false; // set for yahoo to get parent node for image insertion var hash = searchshield.avgCallFunc(this.doc, 'GetHash', outHref); tag.setAttribute("id", "xplid_" + hash); return outHref;};/////////////// 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("&&");