element.childNodes; var cnLen = cN.length; for (var i=0; i < cnLen; i++) { if ((cN[i].nodeType == 1) && (cN[i].nodeName == 'SPAN') && ((cN[i].className == 'title') || (cN[i].className == 'durl'))) return [cN[i].nextSibling, cN[i].parentNode]; } } var parent = searchshield.SearchEngine.prototype.insertNodes; return parent.call(this, node, doc);};/////////////// AOL SEARCH ENGINE ////////////////////////////// ASK SEARCH ENGINE ///////////////searchshield.AskSearchEngine = function(search){ searchshield.SearchEngine.call(this, search);};searchshield.AskSearchEngine.prototype = new searchshield.SearchEngine();searchshield.AskSearchEngine.prototype.constructor = searchshield.AskSearchEngine;searchshield.AskSearchEngine.prototype.name = "ask";searchshield.AskSearchEngine.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 ("www.ask.com" == domain) { if (path.indexOf("web?") == 0) return true; } return false;};searchshield.AskSearchEngine.prototype.includeLink = function(tag){ var outHref = ""; var findStr = ""; if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) return false; if ((tag.className) && (tag.className.indexOf("nu") != -1) && (tag.className.indexOf("info") == -1)) { // exclude green links if ((tag.firstChild) && (tag.firstChild.className) && (tag.firstChild.className.indexOf('attrib') == 0)) { return false; } // 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); if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } } } else { // ad not to google just use href outHref = tag.href; if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } } // primary results have class containing title or L2 ( Wikipedia links ) else if ((tag.className) && ((tag.className.indexOf("title") != -1) || (tag.className.toLowerCase() == "l2"))) { outHref = tag.href; if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } return false;};/////////////// 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 { // 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; var spnsdLinks = searchshield.getParentNodeByTagName("DIV", tag, "className"); if ((spnsdLinks) && (spnsdLinks.className.indexOf('ads') > -1))