!this.showCleanVerdicts) { if (update) this.avg_ls_inline_hide_verdict(anchor); return; } if (update) this.update_inline_image(anchor, nSeverity, parts); else this.add_inline_image(doc, anchor, nSeverity, parts, blShortUrl);};searchshield.SearchEngine.prototype.avg_ls_inline_hide_verdict = function (anchor){ var image = avglsinlineflyover.getImage(anchor); if (image) { image.style.display = "none"; if (image.parentNode && image.parentNode.id == "avg_ls_anch") image.parentNode.style.display = "none"; }};searchshield.SearchEngine.prototype.update_inline_image = function (anchor, nSeverity, aRisk){ // update the image already in the page if (anchor && anchor.firstChild) { var html = ''; var image = ''; if (aRisk != null && nSeverity != null) { var riskCategory = aRisk[1]; var riskName = aRisk[2]; var bgColor = this.inline.color.background[nSeverity]; var borderColor = this.inline.color.border[nSeverity]; image = this.inline.image[nSeverity]; html = avglsinlineflyover.build(riskCategory, riskName, bgColor, borderColor); } var imageElem = anchor.firstChild; imageElem.src = image; if ( html && html.length > 0 ) { imageElem.setAttribute("title", ""); imageElem.attachEvent("onmouseover", function(e){avglsinlineflyover.popup(e, html, nSeverity)}); imageElem.attachEvent("onmouseout", function(e){avglsinlineflyover.hide(e)}); } }};// add the image to the pagesearchshield.SearchEngine.prototype.add_inline_image = function (doc, anchor, nSeverity, aRisk, blShortUrl){ if (anchor == null || anchor.parentNode == null) return null; // get the proper insertion point for the image var insertNode = anchor.nextSibling; while ((insertNode != null) && (insertNode.tagName != null) && (insertNode.tagName == "SPAN")) { insertNode= insertNode.nextSibling; } // see if we already have an image anchor if ((insertNode != null) && (insertNode.id != null) && (insertNode.id == "avg_ls_anch")) { return null; } var html = ''; var image = this.inline.clockImage; if (aRisk != null && nSeverity != null) { var riskCategory = aRisk[1]; var riskName = aRisk[2]; var bgColor = this.inline.color.background[nSeverity]; var borderColor = this.inline.color.border[nSeverity]; image = this.inline.image[nSeverity]; var blUrl; if (blShortUrl) { var aRiskName = riskName.split(':'); var sUrl = searchshield.checkUrl(aRiskName[1]); blUrl = {}; blUrl.riskNameLabel = aRiskName[0] + ': '; blUrl.riskCategory = riskCategory; blUrl.bgColor = bgColor; blUrl.borderColor = borderColor; blUrl.sUrl = sUrl; } else { html = avglsinlineflyover.build(riskCategory, riskName, bgColor, borderColor); } } doc = anchor.ownerDocument; var img = doc.createElement("img"); img.src = image; img.setAttribute("id","avg_ls_image"); img.style.width = "12px"; img.style.height = "12px"; img.style.border = "none"; img.style.padding = "0 3px"; img.style.margin = "0"; if ((html && html.length > 0) || (blUrl != undefined)) { img.setAttribute("title", ""); img.attachEvent("onmouseover", function(e){avglsinlineflyover.popup(e, html, nSeverity, blUrl)}); img.attachEvent("onmouseout", function(e){avglsinlineflyover.hide(e)}); } // create the link element var newAnchor = doc.createElement("A"); newAnchor.setAttribute("id", "avg_ls_anch"); newAnchor.style.display = "inline-block"; newAnchor.style.background = "none repeat scroll 0 0 transparent"; newAnchor.appendChild(img); img = null; // insert the node as either a sibling or a child if (insertNode != null) anchor.parentNode.insertBefore(newAnchor, insertNode); else anchor.parentNode.appendChild(newAnchor); return newAnchor; };//////////////// SEARCH ENGINE /////////////////////////////// GOOGLE SEARCH ENGINE ///////////////searchshield.GoogleSearchEngine = function(search){ searchshield.SearchEngine.call(this, search); this.onlyPrimaries = false;};searchshield.GoogleSearchEngine.prototype = new searchshield.SearchEngine();searchshield.GoogleSearchEngine.prototype.constructor = searchshield.GoogleSearchEngine;searchshield.GoogleSearchEngine.prototype.name = "google"; // the name by which the search engine is known (always lowercase)searchshield.GoogleSearchEngine.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 hostMatch = 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; // For Google the host must match: // .google.com OR // .google.com.XX OR // .google.co.XX OR // .google.XX where XX is a country code // one special case is www.googe.off.ai (Anguilla) // Where any subdomain can come before the top level domain