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; // sponsored links var spnsdLinks = searchshield.getParentNodeByTagName("DIV", tag, "className"); if (spnsdLinks && /ads/.test(spnsdLinks.className)) { if (!tag.parentNode) return false; // parse ads for em tag var baseNode; // horizontal ads sections if (/ads\shoriz/.test(spnsdLinks.className)) 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 == "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]; // no verdicts for links on yahoo.com domain if (/yahoo\.com/.test(domain)) return false } return outHref; } else { if (searchshield.DoesURLContain(tag.href, 'yahoo.com')) return false; 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.match(/yandex\.com|by|kz|ru|ua/i)) && (path.indexOf("yandsearch?") == 0)) { return true; } return false;};searchshield.YandexSearchEngine.prototype.includeLink = function(tag){ if ((tag.href.charAt(0) == '/') || (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; } parentClass = tag.parentNode ? tag.parentNode.className : ''; gParentClass = (tag.parentNode && tag.parentNode.parentNode) ? tag.parentNode.parentNode.className : ''; if (parentClass.match(/moreinfo/i) || gParentClass.match(/moreinfo/i)) { return false; } // links to alt searches on different engines have a classname == b-link if ((tag.className == "b-link") || (tag.className == "b-serp-url__link")) { return false; } return tag.href;};searchshield.YandexSearchEngine.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;};/////////////// YANDEX SEARCH ENGINE ////////////////////////////// SEZNAM SEARCH ENGINE ///////////////searchshield.SeznamSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.elementAttribute