true : false; if (this.showLowRiskVerdicts === true) this.showLowRiskVerdicts = (parseInt(parts[1]) == 1) ? true : false; if (this.showMedRiskVerdicts === true) this.showMedRiskVerdicts = (parseInt(parts[2]) == 1) ? true : false; this.VeriSignSplit = (parseInt(parts[4])); } return true;};searchshield.SearchEngine.prototype.init_inline_ratings = function (doc){ if ((doc == null) || (doc.getElementById("XPLSS_InlineFlyover"))) return; if (!searchshield.quirksMode) { // create style for inline flyovers var styleTag = doc.createElement("style"); styleTag.setAttribute("id","avgILFOStyle"); var headTag = doc.getElementsByTagName("head")[0]; headTag.appendChild(styleTag); var inline_style = styleTag.styleSheet; // stub in the base image name as the url inline_style.addRule(".avgILFO", "background: url(linkscanner://default_inline_border_tl.png) no-repeat top left;"); inline_style.addRule(".avgILFO", "width:0px; font-size:0px; z-index:9999; visibility:hidden; position:absolute; left:-5000px;"); inline_style.addRule(".avgILFO_content", "background: url(linkscanner://default_inline_border_r.png) top right repeat-y;"); inline_style.addRule(".avgILFO_content","font-size:10px; color:black; padding:0px 10px; text-align:left; word-wrap:break-word; line-height:130%"); inline_style.addRule(".avgILFO_head", "background: url(linkscanner://default_inline_border_tr.png) no-repeat top right;"); inline_style.addRule(".avgILFO_head", "width:0px; height:5px;"); inline_style.addRule(".avgILFO_head div","height:5px;"); inline_style.addRule(".avgILFO_foot", "background: url(linkscanner://default_inline_border_bl.png) no-repeat bottom left"); inline_style.addRule(".avgILFO_foot", "height:5px;"); inline_style.addRule(".avgILFO_foot div", "background: url(linkscanner://default_inline_border_br.png) no-repeat bottom right"); inline_style.addRule(".avgILFO_foot div", "height:5px; width:0px;"); } try { // create the popup box var box = doc.createElement("DIV"); if (searchshield.quirksMode) { box.style.visibility = "hidden"; box.style.position = "absolute"; box.style.left = "-5000px"; } box.setAttribute("id", "XPLSS_InlineFlyover"); box.setAttribute("class", "avgILFO"); doc.body.appendChild(box); box = null; } catch(boxErr){}};searchshield.SearchEngine.prototype.show_inline_ratings = function (doc, node, image){ var href = node.href; var anchor = node.element; if ((href == null) || (href.length < 1)) return; if (avglsinlineflyover.imageExists(anchor)) return; // mark search result anchor so it isn't processed repeatedly anchor.setAttribute("avglschecked", "1"); // get verdict this.display_inline(doc, anchor, href, node, false);};searchshield.SearchEngine.prototype.display_inline = function (doc, anchor, href, node, update, min_severity){ // min_severity is the lowest severity to display, so setting it to // 1 would not display safe icons var results = searchshield.avgCallFunc(doc, 'MalsiteCheck', href); if (results == null) return; var parts = results.split('::'); // need at least severity if (parts == null) return; var nSeverity = parseInt(parts[0]); if (!update && nSeverity == searchshield.XPLCHECK_RESULT_SEV_NONE) { var shortUrl = searchshield.FilterUrl(href, this.shortened_urls); if (shortUrl) { // shortened url verdicts display later var engine = this; anchor.attachEvent("onmouseover", function(event){avglsinlineflyover.mouseOverHandler(event, doc, engine)}); return; } } // severity -1 signifies sb.dat load failure if ( nSeverity == -1 ) nSeverity = searchshield.XPLCHECK_RESULT_SEV_NONE; //blacklist url var blShortUrl = false; if (nSeverity == searchshield.XPLCHECK_RESULT_SEV_BLOCK) { var shortUrl = searchshield.FilterUrl(href, this.shortened_urls); if (shortUrl) blShortUrl = true; } // need xlated cat tag and category if (parts.length < 3) return; // check the minimum to display if ((min_severity != null) && (nSeverity < min_severity)) return; if (nSeverity == searchshield.XPLCHECK_RESULT_SEV_LOW && !this.showLowRiskVerdicts) { if (update) this.avg_ls_inline_hide_verdict(anchor); return; } if (nSeverity == searchshield.XPLCHECK_RESULT_SEV_MED && !this.showMedRiskVerdicts) { if (update) this.avg_ls_inline_hide_verdict(anchor); return; } if (nSeverity == searchshield.XPLCHECK_RESULT_SEV_NONE && !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