the uri path and query elements // to use existing logic var path = uri.path + uri.delimiter + uri.query; // www.atlavista.com ---> now http://us.yhs4.search.yahoo.com/yhs/search?fr=altavista&fr=altavista&itag=ody&q=warez&kgs=1&kls=0 // xx.altavista.com where xx is a country code var hostMatch = false; if ("www.altavista.com" == domain) { hostMatch = true; } else { // xx.altavista.com var pDest = domain.indexOf(".altavista.com"); if ((pDest != -1 ) && ((domain.length - pDest) == 14)) { hostMatch = true; } else { // a reference to altavista must be present in yahoo search url var pRef = (uri.qsArray.fr && uri.qsArray.fr == 'altavista'); pDest = domain.indexOf("search.yahoo.com"); if (pDest != -1 && pRef) hostMatch = true; } } if (hostMatch) { //path must start with web/results? if ((path.indexOf("yhs/search?") == 0) || (path.indexOf("search;") == 0) || (path.indexOf("yhs/search;") == 0) || (path.indexOf("web/results?") == 0)|| (path.indexOf("fr=altavista") != -1)) { return true; } } return false;};searchshield.AltaVistaSearchEngine.prototype.includeLink = function(tag){ var outHref = ""; var findStr = ""; // initial checks if ((!tag.href) || (tag.href.charAt(0) == '#') || (tag.href.indexOf("javascript:") == 0)) { return false; } if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) return false; if ((tag.className == "spt") || (tag.className == "res") || (tag.className == "yschttl spt")) { findStr = "/**"; var pos = tag.href.indexOf(findStr); if (pos != -1) { pos += 3; outHref = tag.href.substring(pos); outHref = unescape(outHref); // no results for overture.com & no yahoo domains chkHref = outHref.toLowerCase(); if (chkHref.indexOf("overture.") != -1) return false; // split the url based on '/' var parts = outHref.split('/'); // only need a domain if ((parts != null) && (parts[2] != null)) { 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; } else { return tag.href; } } return false;};searchshield.AltaVistaSearchEngine.prototype.getImgElement = function (element){ while (element != null) { element = element.nextSibling; if (element != null) { if ((element.id == null) || (element.id.indexOf("LXPLSS_") == -1)) { // not our id but hit another anchor no verdict if (element.tagName == "A") { element = null; break; } } else if (element.tagName == "A") break; } } var rtnElem = !!element ? element.firstChild : element; return rtnElem;};/////////////// ALTAVISTA SEARCH ENGINE ////////////////////////////// YANDEX SEARCH ENGINE ///////////////searchshield.YandexSearchEngine = function(search){ searchshield.SearchEngine.call(this, search);};searchshield.YandexSearchEngine.prototype = new searchshield.SearchEngine();searchshield.YandexSearchEngine.prototype.constructor = searchshield.YandexSearchEngine;searchshield.YandexSearchEngine.prototype.name = "yandex";searchshield.YandexSearchEngine.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("yandex.ru") > -1) || (domain.indexOf("yandex.com") > -1)) && (path.indexOf("yandsearch?") == 0)) { return true; } return false;};searchshield.YandexSearchEngine.prototype.includeLink = function(tag){ if (tag.href.indexOf("/search") != -1) { return false; } if (searchshield.DoesURLContain(tag.href, this.search.uri.host) || searchshield.DoesURLContain(tag.href, ".yandex.net") || searchshield.DoesURLContain(tag.href, ".yandex.ru") || searchshield.DoesURLContain(tag.href, "moikrug.ru") || searchshield.DoesURLContain(tag.href, "ya.ru") || searchshield.DoesURLContain(tag.href, ".yandex.com") || searchshield.DoesURLContain(tag.href, "yandex.st")) { return false; } parentNode = tag.parentNode; if ((tag.parentNode) && (tag.parentNode.parentNode) && (tag.parentNode.parentNode.className.toLowerCase() == "moreinfo")) { return false; } return tag.href;};searchshield.YandexSearchEngine.prototype.getImgElement = function (element){ while