to self - DIV elem GrandParent class of res1 or res3 is Sponsored Link var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == "DIV") && ((grandParentNode.className.toLowerCase() == "res1") || (grandParentNode.className.toLowerCase() == "res3"))) { var urlPos = -1; // ads now need unescaping href = unescape(tag.href); if (urlPos == -1) { if (href.indexOf("/aclk?sa=") != -1) { findStr = "&adurl=http"; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos += 7; // puts it on the http } } if (urlPos != -1) { outHref = href.substring(urlPos); // the destination url is in the href string of this redirector if (outHref.indexOf('xg4ken.com') > -1) { urlPos = (unescape(outHref)).indexOf('url[]=') + 6; var destUrl = (unescape(outHref)).substring(urlPos); if (searchshield.FilterUrl(destUrl, this.filter_urls)) { var destUrl = searchshield.getHrefFromCiteElement(tag); if (destUrl) return searchshield.checkUrl(searchshield.removeHtmlTags(destUrl)); return false; } return destUrl; } // filtered url but can get destination from href string if (outHref.indexOf('altfarm.mediaplex.com') > -1) { var tmpoh = unescape(outHref); var destUrl = tmpoh.substring(tmpoh.indexOf('DURL=')+5); if (destUrl != null) { var destUrl = unescape(destUrl); return destUrl; } } // extract any fragment text, shouldn't be unescaped var pound = outHref.indexOf("#"); if (pound != -1) { var fragment = outHref.substring(pound); outHref = outHref.substring(0, pound); outHref = unescape(outHref); outHref += fragment; if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } outHref = unescape(outHref); if (outHref.indexOf("?") == -1) { var ampPos = outHref.indexOf("&"); if (ampPos != -1) outHref = outHref.substring(0, ampPos); } if (searchshield.FilterUrl(outHref, this.filter_urls)) { var destUrl = searchshield.getHrefFromCiteElement(tag); if (destUrl) return searchshield.checkUrl(searchshield.removeHtmlTags(destUrl)); return false; } return outHref; } } } } } // no link to self else { var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == "DIV") && (grandParentNode.className.toLowerCase() == "res2")) { // check for any images on the link if (0 === tag.getElementsByTagName("IMG").length) return tag.href; } } } } // else nothing return false;}/////////////// AVG GOOGLE ////////////////////////////// YAHOO SEARCH ENGINE ///////////////searchshield.YahooSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false;};searchshield.YahooSearchEngine.prototype = new searchshield.SearchEngine();searchshield.YahooSearchEngine.prototype.constructor = searchshield.YahooSearchEngine;searchshield.YahooSearchEngine.prototype.name = "yahoo";searchshield.YahooSearchEngine.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; // For Yahoo the host must match: // search.yahoo.com OR // xx.search.yahoo.com where xx is the country code OR // search.yahoo.co.jp OR // for Yahoo China: one.cn.yahoo.com, search.cn.yahoo.com or www.yahoo.cn if ((domain.match(/search\.yahoo\.co(?:m|\.jp)/i) || domain.match(/(?:search|one)\.cn\.yahoo\.com/i) || domain.match(/www\.yahoo\.cn/i)) && path.match(/^(?:search[;?]|s\?)/i)) { return true; } return false;};searchshield.YahooSearchEngine.prototype.includeLink = function(tag){ var href = ""; var outHref = ""; var findStr = ""; // yahoo likes to encode the url href = unescape(tag.href); 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.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