logic var path = uri.path + uri.delimiter + uri.query; if ("www.ask.com" == domain) { if (path.indexOf("web?") == 0) return true; } return false;};searchshield.AskSearchEngine.prototype.includeLink = function(tag){ var outHref = ""; var findStr = ""; if (/nu|info/i.test(tag.className)) { // exclude green links if ((tag.firstChild) && (tag.firstChild.className) && (tag.firstChild.className.indexOf('attrib') == 0)) { return false; } // exclude sub links in tables if (searchshield.getParentNodeByTagName("TD", tag)) { return false; } // sponsored ads from redirect var cN = tag.childNodes; var cnLen = cN ? cN.length : 0; for (var i=0; i < cnLen; i++) { if ((cN[i].nodeType == 1) && (cN[i].nodeName == 'SPAN') && (cN[i].className == 'T10')) { return searchshield.checkUrl(searchshield.removeHtmlTags(cN[i].innerHTML)); } } // ads link to google with class nu findStr = "www.google.com"; if (tag.href.indexOf(findStr) != 0) { if (tag.href.indexOf(findStr + "/aclk?sa=") != -1) { findStr = "&adurl=http"; var pos = tag.href.indexOf(findStr); if (pos != -1) { pos += 7; outHref = tag.href.substring(pos); outHref = unescape(outHref); // 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, searchshield.filter_urls)) { var destUrl = searchshield.getHrefFromCiteElement(tag); if (destUrl) return searchshield.checkUrl(searchshield.removeHtmlTags(destUrl)); return false; } return destUrl; } if (searchshield.FilterUrl(outHref, searchshield.filter_urls)) return false; return outHref; } } } else { // ad not to google just use href outHref = tag.href; if (searchshield.FilterUrl(outHref, searchshield.filter_urls)) return false; return outHref; } } if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) { return false; } // primary results have class containing title, L2 or L4 ( Wikipedia links ) else if (/title|L[0-9]/i.test(tag.className)) { outHref = tag.href; if (searchshield.FilterUrl(outHref, searchshield.filter_urls)) return false; return outHref; } return false;};searchshield.AskSearchEngine.prototype.insertNodes = function(node,doc){ var element = node.element; var parentNode = node.element.parentNode; // insert alt image if (/XPLSS_/.test(element.id)) { return [null, element]; } var cN = element.getElementsByTagName('span'); for (var i=0; i < cN.length; i++) { if (/title|newAdFont/.test(cN[i].className)) { return [cN[i].nextSibling, cN[i].parentNode]; } } return [null, parentNode];};/////////////// ASK SEARCH ENGINE ////////////////////////////// ALTAVISTA SEARCH ENGINE ///////////////searchshield.AltaVistaSearchEngine = function(search){ searchshield.SearchEngine.call(this, search);};searchshield.AltaVistaSearchEngine.prototype = new searchshield.SearchEngine();searchshield.AltaVistaSearchEngine.prototype.constructor = searchshield.AltaVistaSearchEngine;searchshield.AltaVistaSearchEngine.prototype.name = "altavista";searchshield.AltaVistaSearchEngine.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; // 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 { // prevent verdicts on news site until 69933 is fixed if (domain == 'news.search.yahoo.com') return false; // a reference to altavista must be present in yahoo search url var pRef = (path.indexOf('altavista') != -1); 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("altavista") != -1) ) { return true; } } return