{ 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 = { width: "18", height: "18" }; this.updateImageStyle = { width: "18px", height: "18px" };};searchshield.SeznamSearchEngine.prototype = new searchshield.SearchEngine();searchshield.SeznamSearchEngine.prototype.constructor = searchshield.SeznamSearchEngine;searchshield.SeznamSearchEngine.prototype.name = "seznam";searchshield.SeznamSearchEngine.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("search.seznam.cz") > -1) && ((path.indexOf("?") == 0) || (path.indexOf("svet") == 0))) { return true; } return false;};searchshield.SeznamSearchEngine.prototype.includeLink = function(tag){ if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) return false; var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if ((parentNode.tagName == "SPAN") && ((parentNode.className.toLowerCase() == "sklik-url") || (parentNode.className.toLowerCase() == "sklik-title"))) { // locate the real url and unencode it var urlPos = tag.href.indexOf("&url=http"); if (urlPos != -1) { urlPos += 5; outHref = tag.href.substring(urlPos); outHref = unescape(outHref); return outHref; } } else if (grandParentNode) { var greatGrandParentNode = tag.parentNode.parentNode.parentNode; if ((grandParentNode.tagName == "DIV") && ((grandParentNode.className.toLowerCase() == "text") || (grandParentNode.className.toLowerCase() == "hlasky otz"))) { // standard link return tag.href; } else if (greatGrandParentNode && greatGrandParentNode.tagName == "DIV" && (greatGrandParentNode.className.toLowerCase() == "hotlinks")) { // hint link return tag.href; } } } return false;};/////////////// SEZNAM SEARCH ENGINE ////////////////////////////// WEBHLEDANI SEARCH ENGINE ///////////////searchshield.WebhledaniSearchEngine = function(search){ searchshield.SearchEngine.call(this, search);};searchshield.WebhledaniSearchEngine.prototype = new searchshield.SearchEngine();searchshield.WebhledaniSearchEngine.prototype.constructor = searchshield.WebhledaniSearchEngine;searchshield.WebhledaniSearchEngine.prototype.name = "webhledani";searchshield.WebhledaniSearchEngine.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("webhledani.cz") > -1) && (path.indexOf("results.aspx?") == 0)) { return true; } return false;};searchshield.WebhledaniSearchEngine.prototype.includeLink = function(tag){ if (tag.href.indexOf("/redir.aspx?") != -1) { var ancestorNode; // sponsored link if ((ancestorNode = searchshield.getParentNodeByClassName("results sponsored", tag, 3)) != null) { if ((ancestorNode = searchshield.getParentNodeByClassName("res1", tag, 2)) != null) { var spanSibling = ancestorNode.nextSibling; while (spanSibling.nodeName != 'SPAN') { spanSibling = spanSibling.nextSibling; if (spanSibling.nodeName == 'DIV' || spanSibling.className == 'res1') { spanSibling = null; break; } } if (spanSibling) outHref = spanSibling.innerHTML; } if (outHref) return searchshield.checkUrl(searchshield.removeHtmlTags(outHref)); } if ((ancestorNode = searchshield.getParentNodeByClassName("right-sponsored", tag, 3)) != null) { var outHref; if ((ancestorNode = searchshield.getParentNodeByClassName("res3", tag, 2)) != null) { var spanSibling = ancestorNode.nextSibling; while (spanSibling.nodeName != 'SPAN') { spanSibling = spanSibling.nextSibling; if (spanSibling.nodeName == 'DIV' || spanSibling.className == 'res3') { spanSibling = null; break; } } if (spanSibling) outHref = spanSibling.innerHTML; } if (outHref) return searchshield.checkUrl(searchshield.removeHtmlTags(outHref)); } // result link if (searchshield.getParentNodeByClassName("results", tag, 3) != null) { if ((ancestorNode = searchshield.getParentNodeByClassName("res2", tag, 2)) != null) { if (tag.parentNode && (tag.parentNode.nodeName != 'P')) return getLinkHref(ancestorNode); } } } return false; function getLinkHref(aNode) { var spanElems = aNode.getElementsByTagName('span'); for (var i=0; i < spanElems.length; i++) { if (spanElems[i].className != 'site') continue; var outAnchor = spanElems[i].getElementsByTagName('a')[0]; if (outAnchor == null) outAnchor = spanElems[i]; return searchshield.checkUrl(searchshield.removeHtmlTags(outAnchor.innerHTML));