searchshield.SearchEngine.call(this, search); this.processFrames = true;};searchshield.eBaySearchEngine.prototype = new searchshield.SearchEngine();searchshield.eBaySearchEngine.prototype.constructor = searchshield.eBaySearchEngine;searchshield.eBaySearchEngine.prototype.name = "ebay";searchshield.eBaySearchEngine.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; // ebay.com // shop.ebay.xx // shop.xxxx.ebay.xx like shop.benl.ebay.be // search.auction.co.kr var path = uri.path + uri.delimiter + uri.query; if ((domain.indexOf("ebay.com") > -1) || (domain.indexOf("shop.ebay") > -1) || (domain.indexOf("shop.benl.ebay") > -1)) { if ((path.indexOf("?_from=") == 0) || (path.indexOf("i.html") > -1)) { return true; } } // ebay.se if ((domain.indexOf("search.eim.ebay") > -1) && ((path.indexOf("?kw=") > -1) || (path.indexOf("?ev=") > -1))) { return true; } if ((domain.indexOf("search.auction.co.kr") > -1 ) && ((path.indexOf("?keyword=") > -1))) { // would normally set these properties in the constructor or in an // overriding function but they're only required for this domain // must downsize verdicts for proper display this.elementAttribute = { width: "16", height: "16" }; this.updateImageStyle = { width: "16px", height: "16px" }; return true; } // latin america ebay // listado.mercadolibre.com.xx or listado.mercadolibre.co.xx // or listado.mercadolibre.xx or // category.mercadolibre.com.xx or listado.mercadolibre.xx/category // lista.mercadolivre.com.xx or lista.mercadolivre.com.xx/category if ((domain.indexOf("www.") == -1) && ((domain.indexOf(".mercadolibre.") > -1 ) || (domain.indexOf(".mercadolivre.") > -1 ))) { return true; } return false;};searchshield.eBaySearchEngine.prototype.includeLink = function(tag){ var parentNode = null; var outHref = false; if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) return false; if ( tag.href.indexOf(".ebayrtm.com/clk?") > -1 ) { if ( tag.title == null || tag.title.length < 0 ) return false; // to avoid putting links on things that don't look like links // need to filter them - only put verdict on last item in group var pN = tag.parentNode; if ((pN != null) && (pN.parentNode != null) && (pN.parentNode.nodeName == 'TD')) { // get last element node var lastChild = pN.parentNode.children[pN.parentNode.children.length - 1]; while (lastChild.nodeType != 1) { lastChild = lastChild.previousSibling; } if (pN != lastChild) return false; } outHref = searchshield.removeHtmlTags(tag.title); if (outHref.indexOf(" ") == -1) { // no spaces if (outHref.indexOf(".") > -1) { // at least one dot if (outHref.indexOf(this.search.uri.host) == -1) { // no host if (outHref.toLowerCase().indexOf("ebay.com") == -1) { return outHref; } } } } } // ebay.se - Google ads parentNode = tag.parentNode; if (parentNode && (parentNode.className.toLowerCase() == "google-ad-link")) { if (tag.href.indexOf("/aclk?sa=") != -1) { findStr = "&adurl=http"; var urlPos = tag.href.indexOf(findStr); if (urlPos != -1) { urlPos += 7; // puts it on the http outHref = tag.href.substring(urlPos); // extract any fragment text, shouldn't be unescaped var pound = outHref.indexOf("#"); if (pound != -1) { var fragment = outHref.substring(pound); outHref = outHref.substring(0, pound); outHref = unescape(outHref); outHref += fragment; if (searchshield.FilterUrl(outHref, searchshield.filter_urls)) return false; return outHref; } outHref = unescape(outHref); if (outHref.indexOf("?") == -1) { var ampPos = outHref.indexOf("&"); if (ampPos != -1) outHref = outHref.substring(0, ampPos); } if (searchshield.FilterUrl(outHref, searchshield.filter_urls)) return false; return outHref; } } } // auction.co.kr parentNode = tag.parentNode; if (parentNode && (parentNode.className.toLowerCase() == "link")) { if (tag.href.indexOf("adcr.naver.com") > -1) { outHref = tag.innerText; if ((outHref == null) || (outHref.length < 0)) return false; return outHref; } } // latin america ebay if ( tag.href.toLowerCase().indexOf("clickcounter?") > -1 ) { var spanElements = tag.getElementsByTagName("span"); if ((spanElements != null)