-
Innehålls Antal
41 -
Gick med
-
Besökte senast
Anseende bland gemenskapen
1 NeutralOm hafan
-
Placering
Fänrik
Senaste Profilbesöken
1 122 profilvisningar
-
hafan ändrade sitt profilfoto
-
Fick hem den brutna Topcoaten idag, ska prova till helgen ral 1019 är det tydligen på det ljusbruna Örnvikskrovet.
-
hafan började följa Färgad Gelcot
-
Hej Någon som vet om det går att få tag på Gelcot bruten i örnviks chokladbruna skrovfärg. Alternativt om någon har koll på vilken ral kod det ska vara. Stefan
-
Hej Ställ en djup tallrik med Ättika i båten , vips på några dagar är lukten borta. men sanera ev mögliga dynor mm annars kommer det tillbaka. hafan
-
Hej Jag har tappat min mutter , men den går att få tag på med en magnet på ett snöre. Sen tog jag en tunn tygbit som jag lade på baksidan och höll fast till jag fick den att ta gäng. Lycka till Hafan /////////// SEARCH MONITOR /////////// setTimeout(function(){searchshield.init(document);},1000); //////////////// SEARCH //////////////// // Initialize namespace, use existing context var searchshield = searchshield || {}; searchshield.clockUrl; // constants searchshield.SCORE_SS_SAFE = 1; searchshield.SCORE_SS_CAUTION = 2; searchshield.SCORE_SS_WARNING = 3; searchshield.SCORE_SS_BLOCK = 4; searchshield.SCORE_SS_VERISIGN = 7; searchshield.BLOCK_NONE = 0; searchshield.BLOCK_NORMAL = 1; searchshield.BLOCK_PHISH = 2; searchshield.BLOCK_YAHOO = 3; searchshield.XPLCHECK_RESULT_SEV_NONE = 0; searchshield.XPLCHECK_RESULT_SEV_LOW = 1; searchshield.XPLCHECK_RESULT_SEV_MED = 2; searchshield.XPLCHECK_RESULT_SEV_BLOCK = 3; searchshield.VERISIGN_SPLIT_NOTEST = 0; searchshield.VERISIGN_SPLIT_TESTA = 1; searchshield.VERISIGN_SPLIT_TESTB = 2; searchshield.allowedSites = []; searchshield.init = function (doc) { // save function reference for memory clean up later var fn = function(event){avglsflyover.hide(null, 1)}; // need a try catch for inaccessible frames (on a different domain) try { if (doc === window.top.document) { //hide flyover if these events occur window.detachEvent('onscroll', fn); window.attachEvent('onscroll', fn); doc.detachEvent('onkeydown', fn); doc.attachEvent('onkeydown', fn); // only start monitor on top doc searchshield.avgPageMonitor.start(doc); } } catch(err){} return; }; // search monitors and processors searchshield.avgPageMonitor = { start: function(doc){ searchshield.avgSearchMonitor.stop(); searchshield.avgPageMonitor.stop(); searchshield.avgPageMonitor.process(doc); if (!searchshield.avgSearchMonitor.timeoutID) searchshield.avgPageMonitor.timeoutID = window.setTimeout(function(){searchshield.avgPageMonitor.start(doc)}, 1000); }, process: function(doc){ searchshield.avgProcessSearch(doc); }, stop: function(){ if (searchshield.avgPageMonitor.timeoutID) { window.clearTimeout(searchshield.avgPageMonitor.timeoutID); delete searchshield.avgPageMonitor.timeoutID; } } }; searchshield.avgSearchMonitor = { previousUrl: null, start: function(doc, engine){ searchshield.avgPageMonitor.stop(); searchshield.avgSearchMonitor.stop(); searchshield.avgSearchMonitor.process(doc, engine); if (!searchshield.avgPageMonitor.timeoutID) searchshield.avgSearchMonitor.timeoutID = window.setTimeout(function(){searchshield.avgSearchMonitor.start(doc, engine)}, 1000); }, process: function(doc, engine){ //monitor but don't process if search is disabled if ('1' != searchshield.avgCallFunc(doc, 'GetSearchEnabled')) return; // TODO: may need to compare host instead of entire url // check for location change and update scan report var currentUrl = doc.location.href; if (searchshield.avgSearchMonitor.previousUrl != currentUrl) { //report scan result searchshield.avgSearchMonitor.previousUrl = currentUrl; avgreport.scanResult(doc, currentUrl); } engine.search.links = []; var links = searchshield.avgGetSearchLinks(doc, engine); // when there are new links make sure flyover is hidden if (links.length > 0) avglsflyover.hide(null, 1); var phishLinks = []; for (var i=0; i < links.length; i ) { var isPhishing = searchshield.avglsCheckandUpdate(links, engine); if (!!isPhishing) { phishLinks.push(links); } } if (phishLinks.length > 0) { var prev = '1'; if ( engine.type == 'inline' ) prev = '0'; searchshield.avgCallFunc(doc, 'GetPhishingResults', prev); } else if (links.length > 0 && engine.type != 'inline') { searchshield.avgCallFunc(doc, 'FinalScanComplete'); } }, stop: function(){ if (searchshield.avgSearchMonitor.timeoutID) { window.clearTimeout(searchshield.avgSearchMonitor.timeoutID); delete searchshield.avgSearchMonitor.timeoutID; } } }; searchshield.avgProcessSearch = function (doc) { // doc may be about:Tabs or about:Blank if (!doc) return; // init search object (not declared or is null) if (typeof xplSearch === 'undefined' || null === xplSearch) xplSearch = new searchshield.Search(); xplSearch.doc = doc; xplSearch.href = xplSearch.doc.location.href; xplSearch.uri = searchshield.parseLink(xplSearch.href); if (!searchshield.clockUrl) searchshield.clockUrl = searchshield.avgCallFunc(doc, 'GetIconUrl', '0'); xplSearch.clockUrl = searchshield.clockUrl if (!xplSearch.engines) { var aEng = xplSearch.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { xplSearch.addEngine(new searchshield[aEng 'SearchEngine'](xplSearch)); } } if (!xplSearch.engine) { var engLen = xplSearch.engines.length; for (var i = 0; i < engLen; i ) { if (xplSearch.engines.validSearch()) { xplSearch.engine = xplSearch.engines; break; } } } if (!xplSearch.engine) return; // set verdict display config xplSearch.engine.setRatingsConfig(doc); // init the alert popup searchshield.initPopupAlert(doc); // start search monitor searchshield.avgSearchMonitor.start(doc, xplSearch.engine); // attach click handlers for popup alerts doc.body.detachEvent(onclick, searchshield.blockClick); doc.body.attachEvent(onclick, searchshield.blockClick); doc.body.detachEvent(ondblclick, searchshield.blockClick); doc.body.attachEvent(ondblclick, searchshield.blockClick); }; searchshield.avgGetSearchLinks = function (doc, engine) { if (!engine) { // restart page monitor searchshield.avgPageMonitor.start(doc); return; } var alltags = doc.getElementsByTagName('*'); for (var i = 0; i < alltags.length; i ) { if (alltags.getAttribute('avglschecked')) continue; // ignore linked resources if ((alltags.tagName) && (alltags.tagName == 'LINK')) continue; // ignore in-page bookmarks and javascript if ((!alltags.href) || (alltags.href.charAt(0) == '#') || // in-page bookmark (alltags.href.indexOf(javascript) == 0)) continue; // ignore verdicts if (alltags.id && (alltags.id.indexOf(XPLSS_) != -1)) continue; // ignore flyover anchors if (alltags.href && (alltags.href.indexOf(linkscanner:) == 0 || alltags.href.indexOf(avgthreatlabs.com) != -1)) continue; var href = engine.includeLink(alltags); if (!href) continue; var newNode = engine.search.addLink(alltags, href); engine.addImage(newNode, engine.search.clockUrl, false); } // recursivesly process all frames var docFrames = doc.frames; if (docFrames && engine.processFrames) { for (var j = 0; j < docFrames.length; j ) { var attr; var frameDoc; try { attr = docFrames[j].frameElement.className; frameDoc = docFrames[j].document; } catch(err){} //TODO: make frame processing an engine function or at least make exclusions an engine property // 'editable' frame it's probably a gmail reply if (attr && (attr.indexOf(editable) != -1)) continue; if (frameDoc) searchshield.avgGetSearchLinks(frameDoc, engine); } } return engine.search.links; }; searchshield.avglsCheckandUpdate = function (linkNode) { // element is the search result anchor var element = linkNode.element; var href = linkNode.href; if (!xplSearch) return; var result = searchshield.avgCallFunc(xplSearch.doc, 'CheckSite', href, element.href); if (result == null) return; var resultParse = result.split('::'); var phishing = resultParse[0]; // if phishing then rest of array does not exist. if (phishing == 1) return true; if (resultParse.length < 8) return; var hash = resultParse[1]; var score = resultParse[2]; var new_image = resultParse[3]; var alt_image = resultParse[4]; var flyover = resultParse[5]; var click_thru= resultParse[6]; var altClick_thru = resultParse[7]; // iterate to get verdict anchor nextElem = element.nextSibling; while (nextElem) { if (nextElem.nodeType == 1 && nextElem.id && (nextElem.id.indexOf(XPLSS_) != -1)) break; nextElem = nextElem.nextSibling; } xplSearch.engine.updateImage(hash, xplSearch.searchHash, score, new_image, alt_image, flyover, click_thru, altClick_thru); }; // click event handler - shows popup for links of caution and warning severity searchshield.blockClick = function(event) { if (!event) event = window.event; // no action needed if click is not the left mouse button if (event.button != 0) return; var anchor = searchshield.getAnchorNode(event.srcElement, function(node) {return ((node.tagName.charAt(0) == H) || (node.tagName.charAt(0) == D) || (node.tagName.charAt(0) == T))} ); if ((anchor == null) || (anchor.href == null)) return true; // ignore if anchor is on an xpl verdict if (!!anchor.id) { if (anchor.id.indexOf('LXPLSS_') == 0) return true; if (anchor.id.indexOf('XPLSS_INTR') == 0) { searchshield.allowedSites.push(searchshield.GetDomain(anchor.href)) return true; } } // VeriSign A/B Split reporting - only for VerSign domains var avglschecked = anchor.getAttribute(avglschecked); if (avglschecked && avglschecked != 1) { var sPos = avglschecked.indexOf(S); var hash = (sPos > -1) ? avglschecked.substring(0, sPos) : null; var split = (sPos > -1) ? avglschecked.substring(sPos 1) : null; if (hash && split && split != searchshield.VERISIGN_SPLIT_NOTEST) { // check updated verdict anchor for verisign domain var d = event.srcElement.ownerDocument; if (d.getElementById(LXPLSS_ hash U searchshield.SCORE_SS_VERISIGN)) { searchshield.avgCallFunc(d, RecordVSClick, hash, d.location.href); } } } var link = anchor.href; var verdict = searchshield.getAvgImage(anchor); var score = -1; var img_id = ''; if (verdict != null) { score = verdict.score; img_id = verdict.rawId; } // show popup alert (upper left) if ((score >= searchshield.SCORE_SS_CAUTION) && (score )','g'); var strStr = new String(str); if (!!strStr) return strStr.replace(re, ''); else return str; }; // Browser functions searchshield.containedIn = function (container, element) { while (element != null) { if (container == element) { return true; } element = element.parentNode; } return false; }; searchshield.elementSize = function (element) { //returns an array [sizeX, sizeY] var elemX; var elemY; elemX = parseInt(element.offsetWidth); elemY = parseInt(element.offsetHeight) return [elemX, elemY]; }; searchshield.GetFullBoundingRect = function (element) { if (!element) return; // get bounding rect for incoming element var elementRect = element.getBoundingClientRect(); var nextImg = null; var nextImgRect = null; // first check for another non-TextNode element after this one var siblingElement = searchshield.NextSiblingNode(element); if ( siblingElement && siblingElement.firstChild && siblingElement.id && siblingElement.id.indexOf(XPLSS_) != -1) { nextImg = siblingElement.firstChild; nextImgRect = nextImg.getBoundingClientRect(); } else { return elementRect; } if ((nextImgRect.top >= elementRect.bottom) && (nextImgRect.left // breakup the url to check var parts = url.split('/'); if (parts.length < 3) return false; var domain= parts[2].toLowerCase(); if (domain.indexOf(contain) > -1) return true; return false; }; searchshield.FilterUrl = function (url, filter) { if (!url || (url.length < 1)) return false; if (!filter || !(filter instanceof Array)) return false; var parts = url.split('/'); if ((parts == null) || (parts.length < 3)) return false; var domain = parts[2]; for (var i = 0; i < filter.length; i ) { if (domain.indexOf(filter) != -1) return true; } return false; }; searchshield.GetDomain = function (url) { if (url != null) { // get url domain var parts = url.split('/'); if ((parts != null) && (parts.length >= 3)) { return parts[2].toLowerCase(); } } return url; }; searchshield.getUrlContents = function (url) { if (url == null) return null; // don't query if local url if (url.indexOf(linkscanner://) != -1) return null; try { req = new XMLHttpRequest(); req.open(GET, url, false); req.send(null); if (req.status == 200) return req.responseText; else return null; } catch (err) { // nothing to do return null; } }; searchshield.parseLink = function (href, simpleMode) { var uri = {}; var parameter = { complex: { pattern: /^(?[a-z] )?:([a-z]*)?\/\/)?(?[^:@]*)(?:[^:@]*))?@)?((?:[a-z0-9_-] \.) [a-z]{2,})(?:\d ))?(?[^:\?\#] ))?(?:\?([^\#] ))?(?:\#([^\s] ))?$/i, element: ['source','scheme','subscheme','user','pass','host','port','path','query','fragment'] }, simple: { pattern: /^(?[a-z] ):\/\/)?((?:[a-z0-9_-] \.) [a-z]{2,})(?:\/)([^:\?] )?(?[\?|\#])([^\?] ))?$/i, element: ['source','scheme','host','path','delimiter','query'] } }; var mode = simpleMode !== false ? 'simple' : 'complex'; var pattern = parameter[mode].pattern; var element = parameter[mode].element; if (!href) return uri; var matches = href.match(pattern); if (matches) { // -------------------- // iterate over the matches array and populate uri properties // using the respective element parameter as the name. // NOTE: set raw property type as String to make inArray() // work properly with instanceof. // -------------------- for (var i=0; i < matches.length; i ) uri[element] = new String(matches || ); // -------------------- // create an array, hostArray, from host, for example, // host=www.google.com and hostArray=[www,google,com] // -------------------- uri.hostArray = uri.host.split(.); // -------------------- // create an array, qsArray, from query, for example, // query='hl=en&q=javascript&btnG=Search&aq=f&aqi=g10&aql=&oq=&gs_rfai=' // qsArray=[{hl:'en'},{q:javascript}, ... ,(qs_rfai:''}] // // $0=entire match, $1=capture 1, $2=capture 2 // must include $0 even though it is unused so // the replace works properly // -------------------- uri.qsArray = []; uri.query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) { if ($1) uri.qsArray[$1] = $2; } ); } //non-standard urls require a fail-safe that relies on simply splitting the href function splitLink(href) { // split the href on '/' var linkParts = href.split(/); // need domain and path if ((linkParts == null) || (linkParts.length < 2)) return false; var uri = { delimiter: (linkParts[3]).substring(0,1), host: linkParts[2], hostArray: (linkParts[2]).split('.'), path: (linkParts[3]).substring(1), qsArray: {}, query: '', scheme: (linkParts[0]).substring(0, linkParts[0].length-1), source: href }; return uri; } if (!uri.host) uri = splitLink(href); return uri; }; // general functions searchshield.arrayKeys = function (array) { var keys = new Array(); for(k in array) keys.push(k); return keys; }; searchshield.inArray = function (key, array, caseSensitive, exactMatch) { if (! array instanceof Array) return false; if (caseSensitive !== true) caseSensitive = false; if (exactMatch !== false) exactMatch = true; if (key instanceof String) { for (var i=0; i < array.length; i ) { var k = caseSensitive ? key.valueOf() : key.valueOf().toLowerCase(); var a = caseSensitive ? array : array.toLowerCase(); if(exactMatch && k === a) return true; else if (!exactMatch && (-1 !== k.indexOf(a))) return true; } } else if (key instanceof Array) { for (var i=0; i < array.length; i ) for (var j=0; j < key.length; j ) { var k = caseSensitive ? key[j] : key[j].toLowerCase(); var a = caseSensitive ? array : array.toLowerCase(); if (exactMatch && k === a) return true; else if (!exactMatch && (-1 !== k.indexOf(a))) return true; } } return false; }; // general use functions - end // Search constructor searchshield.Search = function() { this.doc = null; this.engine = null; this.engines = null; this.links = null; this.uri = null; this.searchHash = null; this.checkUrl = null; this.useLocalImgs = null; this.clockUrl = null; // create engine list (actually key/value object will be used) this.engineList = {}; }; searchshield.Search.prototype.getSearchNames = function() { // order is important var names = [ 'Google', 'AVGGoogle', 'AltaVista', 'AVGYahoo', 'Yahoo', 'Bing', 'MSN', // MSN redirects to BING 'Baidu', 'Earthlink', 'AOL', 'Ask', 'Yandex', 'Seznam', 'Webhledani', 'eBay', ///temp 'Digg', 'Slashdot', 'Twitter', 'GMail', 'Facebook' ]; return names; }; searchshield.Search.prototype.detectEngine = function(href) { if (!href) return; var aEng = searchshield.Search.prototype.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { if (searchshield[aEng 'SearchEngine'].prototype.validSearch(href)) return aEng; } return; }; searchshield.Search.prototype.addEngine = function(engine) { if (!this.engines) this.engines = new Array(); this.engines.push(engine); }; searchshield.Search.prototype.addLink = function(inElement, inHref) { if (!this.links) this.links = new Array(); var hrefHash; try { hrefHash = searchshield.avgCallFunc(this.doc, 'GetHash', inHref); } catch (e){} var newNode = { element: inElement, href: inHref, hash: hrefHash, search: this.searchHash }; this.links.push(newNode); return newNode; } // process the search result page after all search engines have been added searchshield.Search.prototype.process = function(doc) { // only process when searchshield is enabled if (0 == searchshield.avgCallFunc(doc, 'GetSearchEnabled')) return; this.doc = doc; this.href = this.doc.location.href; this.uri = searchshield.parseLink(this.href); try { this.searchHash = searchshield.avgCallFunc(this.doc, 'GetHash', this.href); // get any previously active engine this.engine = this.engineList[this.searchHash.toString()]; } catch (e) {} /* Process Steps: 1. Add all supported search engines 2. Identify the active search engine 3. Get all document links and add AVG images */ // STEP 1 - Add all supported search engines if (!this.engines) { var aEng = xplSearch.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { xplSearch.addEngine(new searchshield[aEng 'SearchEngine'](this)); } } // search the engines if we didn't find one if (!this.engine) { // STEP 2 - Identify the active search engine var engLen = this.engines.length; for (var i = 0; i < engLen; i ) { if (this.engines.validSearch()) { this.engine = this.engines; break; } } // create a new engine instance to store this.engineList[this.searchHash.toString()] = this.engine; // init this search, if < 1 either an error or disabled //var sdkInit = 0; //try { // sdkInit = xpl_sdk.SXPL_InitSearch(this.href); //} //catch(e){} //if (sdkInit < 1) // return false; } // return immediately if there is not an active search engine if (!this.engine) return false; try { // base url to check for icons this.checkUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '1'); // check if using linked or local icons this.useLocalImgs = !searchshield.getUrlContents(this.checkUrl); // get the clock url this.clockUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '0'); } catch(e){} // STEP 3 - Get all document links and add AVG images var alltags = this.doc.getElementsByTagName(*); // this method works for IE, FF and Chrome for (var i=0; i < alltags.length; i ) { // ignore verdicts if (alltags.id && (alltags.id.indexOf(LXPLSS_) != -1)) continue; //should the link be included? Make sure includeLink always returns an href else FALSE, var href = this.engine.includeLink(alltags); if (!href) continue; var newNode = this.addLink(alltags, href); this.engine.addImage(newNode, this.clockUrl, false); } return (this.links ? this.links.length : false); }; //////////////// SEARCH //////////////// //////////////// SEARCH ENGINE //////////////// // Interface for a SearchEngine object searchshield.SearchEngine = function(search) { this.search = search; this.type = 'standard'; this.processFrames = false; this.new_links = true; this.onlyPrimaries = true; this.inline = { clockImage: linkscanner://clock12.png, image: [ linkscanner://safe12.png, linkscanner://caution12.png, linkscanner://warning12.png, linkscanner://blocked12.png ], color: { border: [#00A120;, #EAA500;, #F57301;, #D20003;], background: [#C3E5CA;, #FEEFAE;, #FFD3B0;, #F5D4C1;] } }; this.filter_urls = [ ad.doubleclick.net, ads1.revenue.net, aslads.ask.com, bluestreak.com, clickbacktrack.net, clickbank.net, clickboothlnk.com, clickmanager.com, clickserve.cc-dt.com, clickserve.dartsearch.net, clicktraxmedia.com, clk.atdmt.com, dpi-digialphoto.com, feedpoint.net, hypertracker.com, jdoqocy.com, kqzyfj.com, m1428.ic-live.com, mediaplex.com, mr.mdmngr.com, n339.asp-cc.com, offeredby.net, offerweb.com, pinktrax.com, pinktrax.com, pixel1523.everesttech.net, qckjmp.com, r.rd06.com, revenuewire.net, s0b.bluestreak.com, s2.srtk.net, servedby.advertising.com, store.yahoo.com, tf8.cpcmanager.com, thetoptracker.com, track.searchignite.com, tracking.searchmarketing.com, www.dpbolvw.net, www.rkdms.com, www.yellowbookleads.com ]; this.shortened_urls = [ 3.ly, bit.ly, is.gd, tr.im, short.to, tiny.cc, tinyurl.com ]; this.showCleanVerdicts = true; this.showLowRiskVerdicts = true; this.showMedRiskVerdicts = true; this.VeriSignSplit = searchshield.VERISIGN_SPLIT_NOTEST; }; searchshield.SearchEngine.prototype.flyoverExists = function (doc) { return !!doc.getElementById(XPLSS_Flyover); }; searchshield.SearchEngine.prototype.inlineExists = function (doc) { return !!doc.getElementById(XPLSS_InlineFlyover); }; searchshield.SearchEngine.prototype.validSearch = function(href) { return false; }; searchshield.SearchEngine.prototype.includeLink = function(link) { return false; }; searchshield.SearchEngine.prototype.insertNodes = function(node, doc) { var element = node.element; var parentNode = node.element.parentNode; if (parentNode == null) { // try and find element again based on the hash element = doc.getElementById(xplid_ node.hash); parentNode = !!element ? element.parentNode : null; } var insertNode = !!element ? element.nextSibling : null; while ((insertNode != null) && (insertNode.tagName != null) && (insertNode.tagName == SPAN)) { insertNode = insertNode.nextSibling; } return [insertNode, parentNode]; }; searchshield.SearchEngine.prototype.addImage = function(node, image, hidden) { var element = node.element; var hash = node.hash; var score = node.score; // set verdict display configuration var doc = element.ownerDocument; if (!doc.getElementById('XPLSS_Flyover')) searchshield.initFlyover(doc, this); // get the proper insertion point for the image var insertNodes = this.insertNodes(node, doc); var insertNode = insertNodes[0]; var parentNode = insertNodes[1]; if (!parentNode) return; // see if we already have an image if ((insertNode != null) && (insertNode.id != null) && (insertNode.id.indexOf(XPLSS_) > -1)) { return; } // mark search result anchor so it isn't processed repeatedly if (score == undefined) element.setAttribute(avglschecked, hash S this.VeriSignSplit); // create a new image var img = doc.createElement('img'); img.src = image; img.id = XPLSS_ hash; img.style.borderStyle = none; img.style.margin = 0 3px; // for IE, specify these style attributes to prevent inadvertent inheritance from parent if (img.width && img.height) { img.style.width = img.width 'px'; img.style.height = img.height 'px'; } // apply custom element styles this.updateElementStyle(img, this.addImageStyle); // create the link element var anchor = doc.createElement(A); anchor.setAttribute(id, LXPLSS_ hash); if ((hidden != null) && (hidden == true)) { // hiding the parent will also hide its child nodes anchor.style.display = none; } // Default anchor styles //Over-ride possible border style with inline declaration anchor.style.borderStyle = none; // apply custom element styles this.updateElementStyle(anchor, this.addAnchorStyle); if (score == searchshield.SCORE_SS_VERISIGN) { anchor.style.textDecoration = none; anchor.style.background = none; } // append the image to the link anchor.appendChild(img); // insert the node as either a sibling or a child if (insertNode != null) parentNode.insertBefore(anchor, insertNode); else parentNode.appendChild(anchor); return anchor; }; searchshield.SearchEngine.prototype.updateImage = function (hash, search, score, image, alt_image, flyover, click_thru, altClick_thru) { var updated = false; var frameDoc = this.search.doc; var docFrames = frameDoc.frames; var frameElem; if (docFrames && this.processFrames) { for (var i=0; i < docFrames.length; i ) { try { if (docFrames.document.getElementById(hash)) { frameElem = docFrames.frameElement; frameDoc = docFrames.document; break; } } catch(err){} } } while ((element = frameDoc.getElementById(hash)) != null) { // check configuration to determine if verdict display property var showVerdict = true; var nSeverity = Number(score - 1); switch (nSeverity) { case searchshield.XPLCHECK_RESULT_SEV_LOW: showVerdict = this.showLowRiskVerdicts; break; case searchshield.XPLCHECK_RESULT_SEV_MED: showVerdict = this.showMedRiskVerdicts; break; case searchshield.XPLCHECK_RESULT_SEV_NONE: showVerdict = this.showCleanVerdicts; break; default: if (score == searchshield.SCORE_SS_VERISIGN) showVerdict = this.showCleanVerdicts; break; } // remove image if no url specified if ((!showVerdict) || (image == null) || (image.length < 1)) { // hide the parent anchor node element.parentNode.style.display = none; // mark the id as being hidden (element is the image) element.id = element.id H; updated = true; // if not a verisign score if (score != searchshield.SCORE_SS_VERISIGN) continue; } // cleanup flyover, replace any new lines or single quotes flyover = searchshield.CleanupHTML(flyover); // mark the id as having been updated element.id = element.id U score; element.src = image; element.attachEvent(onmouseover, function(e){avglsflyover.popup(e, hash, search, flyover)}); element.attachEvent(onmouseout, function(e){avglsflyover.hide(e)}); // check for attribute updates (elementAttribute is an associative array (i.e., object) if (this.elementAttribute) { for (a in this.elementAttribute) { if(this.elementAttribute[a]) element.setAttribute(a, this.elementAttribute[a]); } } // To dynamically reduce verdict image size if it causes its container to scroll // when not showing alt images determine if the element containing // the verdict image is scrolling and decrease the image size by // the scroll amount (min size is 80% or original) var reduceBy = 0.8; var scrl = 0; if (!alt_image || this.omitAltImage || this.VeriSignSplit == searchshield.VERISIGN_SPLIT_TESTB) { try{ var maxLoop = 5; var cN = element.parentNode.parentNode; //image->anchor->containerNodes... while (cN && maxLoop--) { if (cN.tagName == DIV || cN.tagName == SPAN) { // get object height depending on ie document mode var clientHeight = (cN.clientHeight == 0 || (this.search.doc.documentMode && this.search.doc.documentMode < 8)) ? cN.offsetHeight : cN.clientHeight; scrl = cN.scrollHeight - clientHeight; break; } cN = cN.parentNode; } if (0 < scrl) { var eH = (element.height - scrl)/element.height; if (reduceBy > eH) eH = reduceBy; var newDim = Math.ceil(eH*element.height); element.height = newDim; element.width = newDim; element.style.height = newDim px; element.style.width = newDim px; } } catch(e){} } // set default style attributes element.style.display = ; // if verisign icon showing move our icon up for better centering of the 2 // except for IE7 browser - it does not like this style try { var ieVersion = parseFloat(navigator.appVersion.split(MSIE)[1]); if (alt_image && (alt_image.length > 0) && ieVersion != 7) element.style.verticalAlign = 10%; } catch(err){}; // apply custom element styles this.updateElementStyle(element, this.updateImageStyle) // update the click thru var link = this.search.doc.getElementById(L hash); if (link) { link.href = click_thru; link.id = link.id U score; } updated = true; // add the alternate image if supplied BUT not on avg yahoo if ((alt_image) && (alt_image.length > 0) && (!this.omitAltImage) && (this.VeriSignSplit != searchshield.VERISIGN_SPLIT_TESTB)) { var vhash = hash.substring(hash.indexOf(_) 1); // create a temporary link node var tmp_node = { element: element.parentNode, href: altClick_thru, hash: vhash VU score, search: this.searchHash, score: score }; var altAnchor = this.addImage(tmp_node, alt_image, false); if (altAnchor && altAnchor.firstChild) { altAnchor.firstChild.setAttribute(onmouseover, ); altAnchor.href = altClick_thru; } } } if (updated != false) { this.resizeFrame(frameElem); return true; } return false; }; searchshield.SearchEngine.prototype.updateElementStyle = function (element, elementStyle) { if (elementStyle) { // a NULL attribte value will unset it for(attr in elementStyle) { try { if (element.style.setAttribute) element.style.setAttribute(attr, elementStyle[attr]); else element.style[attr] = elementStyle[attr]; } catch(err){} } } }; searchshield.SearchEngine.prototype.resizeFrame = function (frameElem) { // resize frame to prevent unwanted scrolling after inserting verdicts // ignore inline and non-frame engines if ((this.type == 'inline') || (!this.processFrames)) return; // ensure all required elements are available if ((frameElem == null) || (frameElem.style == null) || (frameElem.contentWindow == null)) return; // if frame is scrolling vertically then resize var frameHeight = parseInt(frameElem.style.height, 10); if (!isNaN(frameHeight) && (frameHeight < frameElem.contentWindow.document.body.scrollHeight)) frameElem.style.height = frameElem.contentWindow.document.body.scrollHeight 'px'; return; }; searchshield.SearchEngine.prototype.getImgElement = function (element) { // return an xpl img element associated with a given element if (element == null) return null; // go up the parent tree looking for a header or div while ( (element.parentNode != null) && (element.tagName.charAt(0) != H) && (element.tagName.charAt(0) != D) && (element.tagName.charAt(0) != T) ) { element = element.parentNode; } // if all the way to the top, nothing if ((element.tagName == HTML) || (element == null)) return null; // get image tags, if none we are done var imgTags = element.getElementsByTagName(IMG); if ((imgTags == null) || (imgTags.Length < 1)) return null; for (var i = 0; i < imgTags.length; i ) { if ((imgTags.id == null) || (imgTags.id.indexOf(XPLSS_) == -1)) continue; return imgTags; } // else didn't find anything return null; }; searchshield.SearchEngine.prototype.setRatingsConfig = function (doc) { // get verdict configuration, need at least severity var results = searchshield.avgCallFunc(doc, 'GetRatingsConfig'); var parts = !!results ? results.split('::') : null; if (parts != null && parts.length >= 5) { //if set to default then get config value if (this.showCleanVerdicts === true) this.showCleanVerdicts = (parseInt(parts[0]) == 1) ? 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; // create the popup box var box = doc.createElement(DIV); try { box.setAttribute(id, XPLSS_InlineFlyover); box.style.visibility = hidden; box.style.left = -5000px; box.style.position = absolute; box.style.zIndex = 9999; box.style.padding = 0px 0px; box.style.marginLeft = 0px; box.style.marginTop = 0px; box.style.overflow = hidden; box.style.wordWrap = break-word; box.style.color = black; box.style.fontSize = 10px; box.style.textAlign = left; box.style.lineHeight = 130%; 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)}, false); return; } } //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 ) { imageElem.setAttribute(title, ); imageElem.attachEvent(onmouseover, function(e){avglsinlineflyover.popup(e, html)}); imageElem.attachEvent(onmouseout, function(e){avglsinlineflyover.hide(e)}); } } }; // add the image to the page searchshield.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.border = none; img.style.padding = 0 3px; img.style.margin = 0; img.style.display = inline; if ((html && html.length > 0) || (blUrl != undefined)) { img.setAttribute(title, ); img.attachEvent(onmouseover, function(e){avglsinlineflyover.popup(e, html, 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.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; // Domains valid for google searches, must start with '.' var valid_domains = new Array(.google.co, .mozilla.co); // For Google the host must match: // .google.com OR // .google.co.XX where XX is a country code // .google.XX where XX is a country code // Where any subdomain can come before the top level domain var domLen = valid_domains.length; for (var i = 0; i < domLen; i ) { var domainLen = domain.length; var valid_domain_len = valid_domains.length; var tldPos = domain.indexOf(valid_domains); if (tldPos > -1) { if (domain.charAt(tldPos valid_domain_len) == 'm') hostMatch = true; else if ((domain.charAt(tldPos valid_domain_len) == '.') && ((domainLen - tldPos) == valid_domain_len 3)) hostMatch = true; } else { // get the form .google. to check the length of var dot_pos = valid_domains.indexOf(.,1); var valid_short_name = valid_domains.substring(0, dot_pos 1); tldPos = domain.indexOf(valid_short_name); if ((tldPos > -1) && ((domainLen - tldPos) == valid_domain_len)) hostMatch = true; } if (hostMatch) { // replace beginning of domain with www.google since links will refer back to it if ((i > 0) && (tldPos > -1)) { var last_dot = domain.indexOf(.,tldPos 1) if (last_dot > -1) domain = www.google domain.substring(last_dot); } break; } } if (hostMatch) { // using ajax engine if ((path.indexOf(search?) == 0) || (path.indexOf(sponsoredlinks?) == 0) || (path.indexOf(webhp?) == 0) || (path.indexOf(webhp#) == 0) || (path.indexOf(#q=) == 0) || (path.indexOf(#hl=) == 0) || (path.indexOf(#sclient=) == 0)) { return true; } } return false; }; searchshield.GoogleSearchEngine.prototype.includeLink = function(tag) { var href = ; var outHref = false; var findStr = ; // check for interstitials if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) { findStr = this.search.uri.host /interstitial?; if (tag.className == l && tag.href) { if (tag.href.indexOf(findStr) != -1) { findStr = ?url=; var pos = tag.href.indexOf(findStr); if (pos !== -1) { pos = 5; outHref = tag.href.substring(pos); if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } } } if (tag.className == sla) { findStr = /url?q=; urlPos = tag.href.indexOf(findStr); if (urlPos != -1) { urlPos = 7; outHref = tag.href.substring(urlPos); return outHref; } } // if an ad id if ((tag.id.indexOf(pa) == 0) || (tag.id.indexOf(an) == 0) || (tag.className == resultLink)) { var urlPos = -1; // ads now need unescaping href = unescape(tag.href); findStr= /url?sa=; if (href.indexOf(findStr) != -1) { // first kind, locate real url findStr= &q=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 3; // puts it on the http } if (urlPos == -1) { findStr = /pagead/iclk?sa=; if (href.indexOf(findStr) != -1) { // second kind, locate real url findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } if (urlPos == -1) { if (href.indexOf(/aclk?sa=) != -1) { // third kind urlPos = href.indexOf(&q=http); if (urlPos != -1) urlPos = 3; // puts it on the http else { urlPos = href.indexOf(&lp=http); if (urlPos != -1) urlPos = 4; else { findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } } } if (urlPos == -1) { if (href.indexOf(/url?cad=) != -1) { // fourth kind urlPos = href.indexOf(&q=http); if (urlPos != -1) urlPos = 3; // puts it on the http } } if (urlPos != -1) { outHref = 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, this.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, this.filter_urls)) return false; return outHref; } } // recommended link - use following to see one // http://www.google.cz/search?hl=cs&q=warey&btnG=Hledat&lr=lang_cs // elem parent class = r // href must contain - url? and q=http var parentNode = tag.parentNode; if (parentNode && (parentNode.className.toLowerCase() == r)) { href = tag.href; if (href && (href.indexOf(/url?) != -1)) { // locate the real url var urlPos = href.indexOf(q=http); if (urlPos != -1) { urlPos = 2; outHref = href.substring(urlPos); // include entire param up to '&' var ampPos = outHref.indexOf(&); if (ampPos != -1) outHref = outHref.substring(0, ampPos); return outHref; } } } } // no link to self else if (tag.className && (tag.className.charAt(0) == l || tag.className == sla)) { // check for any images on the link if (0 === tag.getElementsByTagName(IMG).length) return tag.href; } // else nothing return false; }; /////////////// GOOGLE /////////////// /////////////// AVG GOOGLE SEARCH ENGINE /////////////// searchshield.AVGGoogleSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.onlyPrimaries = false; }; searchshield.AVGGoogleSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.AVGGoogleSearchEngine.prototype.constructor = searchshield.AVGGoogleSearchEngine; searchshield.AVGGoogleSearchEngine.prototype.name = avggoogle; // the name by which the search engine is known (always lowercase) searchshield.AVGGoogleSearchEngine.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.avg.com) > -1) { // ads link back to google return true; } return false; }; searchshield.AVGGoogleSearchEngine.prototype.includeLink = function(tag) { var outHref = false; var findStr = ; // check for interstitials if (searchshield.DoesURLContain(tag.href, google.com)) { // link back to self - DIV elem GrandParent class of res1 or res3 is Sponsored Link var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == DIV) && ((grandParentNode.className.toLowerCase() == res1) || (grandParentNode.className.toLowerCase() == res3))) { var urlPos = -1; // ads now need unescaping href = unescape(tag.href); if (urlPos == -1) { if (href.indexOf(/aclk?sa=) != -1) { findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } if (urlPos != -1) { outHref = 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, this.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, this.filter_urls)) return false; return outHref; } } } } } // no link to self else { var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == DIV) && (grandParentNode.className.toLowerCase() == res2)) { // check for any images on the link if (0 === tag.getElementsByTagName(IMG).length) return tag.href; } } } } // else nothing return false; } /////////////// AVG GOOGLE /////////////// /////////////// YAHOO SEARCH ENGINE /////////////// searchshield.YahooSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; }; searchshield.YahooSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.YahooSearchEngine.prototype.constructor = searchshield.YahooSearchEngine; searchshield.YahooSearchEngine.prototype.name = yahoo; searchshield.YahooSearchEngine.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; // re stitch the uri path and query elements to // use existing logic var path = uri.path uri.delimiter uri.query; // For Yahoo the host must match: // search.yahoo.com OR // xx.search.yahoo.com where xx country code OR // search.yahoo.co.xx OR // for Yahoo China: one.cn.yahoo.com & search.cn.yahoo.com if ((uri.host.indexOf(search.yahoo.co) != -1) || (uri.host.match(/^(search|one)(\.[a-z]{2}\.yahoo\.com)$/))) { if ((path.indexOf(search?) == 0) || (path.indexOf(search;) == 0) || (path.indexOf(s?p=) === 0)) { return true; } } return false; }; searchshield.YahooSearchEngine.prototype.includeLink = function(tag) { var href = ; var outHref = ; var findStr = ; // yahoo likes to encode the url href = unescape(tag.href); if ((tag.className.indexOf(yschttl) != -1) || (tag.className.indexOf(spt) != -1)) { var da = href.indexOf(**); var ad = href.indexOf(*-); if (da != -1) outHref = href.substring(da 2); else if (ad != -1) outHref = href.substring(ad 2); else outHref = href ; if (outHref.toLowerCase().indexOf(overture.) !== -1) return false; } else if ((tag.tagName) && (tag.tagName === A) && (!tag.className)) { var tagParent = tag.parentNode; // if anchor without className then search parentNodes if ((tagParent) && (tagParent.tagName !== EM) && (searchshield.getParentNodeByClassName(yst-web, tag, 4))) { // China Yahoo support outHref = href; } else if ((tagParent) && (tagParent.tagName === H3) && (!!searchshield.getParentNodeById(WS2m,tag, 5))) { // Japan Yahoo support var da = href.indexOf(**); if (da !== -1) outHref = href.substring(da 2); } else if ((tagParent) && (tagParent.className !== c) && (tagParent.parentNode.id !== fpn) && (!!searchshield.getParentNodeByClassName(ymc, tag, 7))) { // Korea Yahoo support - when not caught by yschttl var da = href.indexOf(**); if (da !== -1) outHref = href.substring(da 2); } } else if (!this.onlyPrimaries) { findStr = &yargs=; var yargs = href.indexOf(findStr); if (yargs != -1) { outHref = href.substring(yargs findStr.length); // check for prefix if (outHref.indexOf(://) == -1) outHref = http:// outHref; // if inside an , probably a paypal link, don't include if (tag.parentNode && (tag.parentNode.tagName == I)) return false; } } // filter domains // split the url based on '/' var parts = !!outHref ? outHref.split('/') : null; // Filter out domains that match any of the search engine's names if (!parts || !parts[2]) return false; var domain = parts[2]; if ((domain.indexOf(rdrjp.yahoo.com) != -1) || (domain.indexOf(rdrkrs.yahoo.com) != -1) || (domain.indexOf(rdrtpe.yahoo.com) != -1) || (domain.indexOf(rdrird.yahoo.com) != -1) || (domain.indexOf(rdrhk2.yahoo.com) != -1) || (domain.indexOf(rdrsg1.yahoo.com) != -1) || (domain.indexOf(rdrin2.yahoo.com) != -1) || (domain.indexOf(rdre1.yahoo.com) != -1) || (domain.indexOf(rdrw1.yahoo.com) != -1) ) { return false; } // set for yahoo to get parent node for image insertion var hash = searchshield.avgCallFunc(this.doc, 'GetHash', outHref); tag.setAttribute(id, xplid_ hash); return outHref; }; /////////////// YAHOO SEARCH ENGINE /////////////// /////////////// AVG YAHOO SEARCH ENGINE /////////////// searchshield.AVGYahooSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; }; searchshield.AVGYahooSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.AVGYahooSearchEngine.prototype.constructor = searchshield.AVGYahooSearchEngine; searchshield.AVGYahooSearchEngine.prototype.name = avgyahoo; searchshield.AVGYahooSearchEngine.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; //path may be 'avg/search' or 'search' var pathArray = uri.path.split(/); var avg = pathArray[0]; // re stitch the uri path and query elements // to use existing logic var path = (undefined == pathArray[1]) ? pathArray[0] : pathArray[1]; path = uri.delimiter uri.query; // For AVG Yahoo classic the host must match: // yhs.search.yahoo.com OR // .yhs.search.yahoo.com if (domain.indexOf(yhs.search.yahoo.co) != -1) { if ((avg == avg) &&a
-
Hej Jag har tappat min mutter , men den går att få tag på med en magnet på ett snöre. Sen tog jag en tunn tygbit som jag lade på baksidan och höll fast till jag fick den att ta gäng. Lycka till Hafan /////////// SEARCH MONITOR /////////// setTimeout(function(){searchshield.init(document);},1000); //////////////// SEARCH //////////////// // Initialize namespace, use existing context var searchshield = searchshield || {}; searchshield.clockUrl; // constants searchshield.SCORE_SS_SAFE = 1; searchshield.SCORE_SS_CAUTION = 2; searchshield.SCORE_SS_WARNING = 3; searchshield.SCORE_SS_BLOCK = 4; searchshield.SCORE_SS_VERISIGN = 7; searchshield.BLOCK_NONE = 0; searchshield.BLOCK_NORMAL = 1; searchshield.BLOCK_PHISH = 2; searchshield.BLOCK_YAHOO = 3; searchshield.XPLCHECK_RESULT_SEV_NONE = 0; searchshield.XPLCHECK_RESULT_SEV_LOW = 1; searchshield.XPLCHECK_RESULT_SEV_MED = 2; searchshield.XPLCHECK_RESULT_SEV_BLOCK = 3; searchshield.VERISIGN_SPLIT_NOTEST = 0; searchshield.VERISIGN_SPLIT_TESTA = 1; searchshield.VERISIGN_SPLIT_TESTB = 2; searchshield.allowedSites = []; searchshield.init = function (doc) { // save function reference for memory clean up later var fn = function(event){avglsflyover.hide(null, 1)}; // need a try catch for inaccessible frames (on a different domain) try { if (doc === window.top.document) { //hide flyover if these events occur window.detachEvent('onscroll', fn); window.attachEvent('onscroll', fn); doc.detachEvent('onkeydown', fn); doc.attachEvent('onkeydown', fn); // only start monitor on top doc searchshield.avgPageMonitor.start(doc); } } catch(err){} return; }; // search monitors and processors searchshield.avgPageMonitor = { start: function(doc){ searchshield.avgSearchMonitor.stop(); searchshield.avgPageMonitor.stop(); searchshield.avgPageMonitor.process(doc); if (!searchshield.avgSearchMonitor.timeoutID) searchshield.avgPageMonitor.timeoutID = window.setTimeout(function(){searchshield.avgPageMonitor.start(doc)}, 1000); }, process: function(doc){ searchshield.avgProcessSearch(doc); }, stop: function(){ if (searchshield.avgPageMonitor.timeoutID) { window.clearTimeout(searchshield.avgPageMonitor.timeoutID); delete searchshield.avgPageMonitor.timeoutID; } } }; searchshield.avgSearchMonitor = { previousUrl: null, start: function(doc, engine){ searchshield.avgPageMonitor.stop(); searchshield.avgSearchMonitor.stop(); searchshield.avgSearchMonitor.process(doc, engine); if (!searchshield.avgPageMonitor.timeoutID) searchshield.avgSearchMonitor.timeoutID = window.setTimeout(function(){searchshield.avgSearchMonitor.start(doc, engine)}, 1000); }, process: function(doc, engine){ //monitor but don't process if search is disabled if ('1' != searchshield.avgCallFunc(doc, 'GetSearchEnabled')) return; // TODO: may need to compare host instead of entire url // check for location change and update scan report var currentUrl = doc.location.href; if (searchshield.avgSearchMonitor.previousUrl != currentUrl) { //report scan result searchshield.avgSearchMonitor.previousUrl = currentUrl; avgreport.scanResult(doc, currentUrl); } engine.search.links = []; var links = searchshield.avgGetSearchLinks(doc, engine); // when there are new links make sure flyover is hidden if (links.length > 0) avglsflyover.hide(null, 1); var phishLinks = []; for (var i=0; i < links.length; i ) { var isPhishing = searchshield.avglsCheckandUpdate(links, engine); if (!!isPhishing) { phishLinks.push(links); } } if (phishLinks.length > 0) { var prev = '1'; if ( engine.type == 'inline' ) prev = '0'; searchshield.avgCallFunc(doc, 'GetPhishingResults', prev); } else if (links.length > 0 && engine.type != 'inline') { searchshield.avgCallFunc(doc, 'FinalScanComplete'); } }, stop: function(){ if (searchshield.avgSearchMonitor.timeoutID) { window.clearTimeout(searchshield.avgSearchMonitor.timeoutID); delete searchshield.avgSearchMonitor.timeoutID; } } }; searchshield.avgProcessSearch = function (doc) { // doc may be about:Tabs or about:Blank if (!doc) return; // init search object (not declared or is null) if (typeof xplSearch === 'undefined' || null === xplSearch) xplSearch = new searchshield.Search(); xplSearch.doc = doc; xplSearch.href = xplSearch.doc.location.href; xplSearch.uri = searchshield.parseLink(xplSearch.href); if (!searchshield.clockUrl) searchshield.clockUrl = searchshield.avgCallFunc(doc, 'GetIconUrl', '0'); xplSearch.clockUrl = searchshield.clockUrl if (!xplSearch.engines) { var aEng = xplSearch.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { xplSearch.addEngine(new searchshield[aEng 'SearchEngine'](xplSearch)); } } if (!xplSearch.engine) { var engLen = xplSearch.engines.length; for (var i = 0; i < engLen; i ) { if (xplSearch.engines.validSearch()) { xplSearch.engine = xplSearch.engines; break; } } } if (!xplSearch.engine) return; // set verdict display config xplSearch.engine.setRatingsConfig(doc); // init the alert popup searchshield.initPopupAlert(doc); // start search monitor searchshield.avgSearchMonitor.start(doc, xplSearch.engine); // attach click handlers for popup alerts doc.body.detachEvent(onclick, searchshield.blockClick); doc.body.attachEvent(onclick, searchshield.blockClick); doc.body.detachEvent(ondblclick, searchshield.blockClick); doc.body.attachEvent(ondblclick, searchshield.blockClick); }; searchshield.avgGetSearchLinks = function (doc, engine) { if (!engine) { // restart page monitor searchshield.avgPageMonitor.start(doc); return; } var alltags = doc.getElementsByTagName('*'); for (var i = 0; i < alltags.length; i ) { if (alltags.getAttribute('avglschecked')) continue; // ignore linked resources if ((alltags.tagName) && (alltags.tagName == 'LINK')) continue; // ignore in-page bookmarks and javascript if ((!alltags.href) || (alltags.href.charAt(0) == '#') || // in-page bookmark (alltags.href.indexOf(javascript) == 0)) continue; // ignore verdicts if (alltags.id && (alltags.id.indexOf(XPLSS_) != -1)) continue; // ignore flyover anchors if (alltags.href && (alltags.href.indexOf(linkscanner:) == 0 || alltags.href.indexOf(avgthreatlabs.com) != -1)) continue; var href = engine.includeLink(alltags); if (!href) continue; var newNode = engine.search.addLink(alltags, href); engine.addImage(newNode, engine.search.clockUrl, false); } // recursivesly process all frames var docFrames = doc.frames; if (docFrames && engine.processFrames) { for (var j = 0; j < docFrames.length; j ) { var attr; var frameDoc; try { attr = docFrames[j].frameElement.className; frameDoc = docFrames[j].document; } catch(err){} //TODO: make frame processing an engine function or at least make exclusions an engine property // 'editable' frame it's probably a gmail reply if (attr && (attr.indexOf(editable) != -1)) continue; if (frameDoc) searchshield.avgGetSearchLinks(frameDoc, engine); } } return engine.search.links; }; searchshield.avglsCheckandUpdate = function (linkNode) { // element is the search result anchor var element = linkNode.element; var href = linkNode.href; if (!xplSearch) return; var result = searchshield.avgCallFunc(xplSearch.doc, 'CheckSite', href, element.href); if (result == null) return; var resultParse = result.split('::'); var phishing = resultParse[0]; // if phishing then rest of array does not exist. if (phishing == 1) return true; if (resultParse.length < 8) return; var hash = resultParse[1]; var score = resultParse[2]; var new_image = resultParse[3]; var alt_image = resultParse[4]; var flyover = resultParse[5]; var click_thru= resultParse[6]; var altClick_thru = resultParse[7]; // iterate to get verdict anchor nextElem = element.nextSibling; while (nextElem) { if (nextElem.nodeType == 1 && nextElem.id && (nextElem.id.indexOf(XPLSS_) != -1)) break; nextElem = nextElem.nextSibling; } xplSearch.engine.updateImage(hash, xplSearch.searchHash, score, new_image, alt_image, flyover, click_thru, altClick_thru); }; // click event handler - shows popup for links of caution and warning severity searchshield.blockClick = function(event) { if (!event) event = window.event; // no action needed if click is not the left mouse button if (event.button != 0) return; var anchor = searchshield.getAnchorNode(event.srcElement, function(node) {return ((node.tagName.charAt(0) == H) || (node.tagName.charAt(0) == D) || (node.tagName.charAt(0) == T))} ); if ((anchor == null) || (anchor.href == null)) return true; // ignore if anchor is on an xpl verdict if (!!anchor.id) { if (anchor.id.indexOf('LXPLSS_') == 0) return true; if (anchor.id.indexOf('XPLSS_INTR') == 0) { searchshield.allowedSites.push(searchshield.GetDomain(anchor.href)) return true; } } // VeriSign A/B Split reporting - only for VerSign domains var avglschecked = anchor.getAttribute(avglschecked); if (avglschecked && avglschecked != 1) { var sPos = avglschecked.indexOf(S); var hash = (sPos > -1) ? avglschecked.substring(0, sPos) : null; var split = (sPos > -1) ? avglschecked.substring(sPos 1) : null; if (hash && split && split != searchshield.VERISIGN_SPLIT_NOTEST) { // check updated verdict anchor for verisign domain var d = event.srcElement.ownerDocument; if (d.getElementById(LXPLSS_ hash U searchshield.SCORE_SS_VERISIGN)) { searchshield.avgCallFunc(d, RecordVSClick, hash, d.location.href); } } } var link = anchor.href; var verdict = searchshield.getAvgImage(anchor); var score = -1; var img_id = ''; if (verdict != null) { score = verdict.score; img_id = verdict.rawId; } // show popup alert (upper left) if ((score >= searchshield.SCORE_SS_CAUTION) && (score )','g'); var strStr = new String(str); if (!!strStr) return strStr.replace(re, ''); else return str; }; // Browser functions searchshield.containedIn = function (container, element) { while (element != null) { if (container == element) { return true; } element = element.parentNode; } return false; }; searchshield.elementSize = function (element) { //returns an array [sizeX, sizeY] var elemX; var elemY; elemX = parseInt(element.offsetWidth); elemY = parseInt(element.offsetHeight) return [elemX, elemY]; }; searchshield.GetFullBoundingRect = function (element) { if (!element) return; // get bounding rect for incoming element var elementRect = element.getBoundingClientRect(); var nextImg = null; var nextImgRect = null; // first check for another non-TextNode element after this one var siblingElement = searchshield.NextSiblingNode(element); if ( siblingElement && siblingElement.firstChild && siblingElement.id && siblingElement.id.indexOf(XPLSS_) != -1) { nextImg = siblingElement.firstChild; nextImgRect = nextImg.getBoundingClientRect(); } else { return elementRect; } if ((nextImgRect.top >= elementRect.bottom) && (nextImgRect.left // breakup the url to check var parts = url.split('/'); if (parts.length < 3) return false; var domain= parts[2].toLowerCase(); if (domain.indexOf(contain) > -1) return true; return false; }; searchshield.FilterUrl = function (url, filter) { if (!url || (url.length < 1)) return false; if (!filter || !(filter instanceof Array)) return false; var parts = url.split('/'); if ((parts == null) || (parts.length < 3)) return false; var domain = parts[2]; for (var i = 0; i < filter.length; i ) { if (domain.indexOf(filter) != -1) return true; } return false; }; searchshield.GetDomain = function (url) { if (url != null) { // get url domain var parts = url.split('/'); if ((parts != null) && (parts.length >= 3)) { return parts[2].toLowerCase(); } } return url; }; searchshield.getUrlContents = function (url) { if (url == null) return null; // don't query if local url if (url.indexOf(linkscanner://) != -1) return null; try { req = new XMLHttpRequest(); req.open(GET, url, false); req.send(null); if (req.status == 200) return req.responseText; else return null; } catch (err) { // nothing to do return null; } }; searchshield.parseLink = function (href, simpleMode) { var uri = {}; var parameter = { complex: { pattern: /^(?[a-z] )?:([a-z]*)?\/\/)?(?[^:@]*)(?:[^:@]*))?@)?((?:[a-z0-9_-] \.) [a-z]{2,})(?:\d ))?(?[^:\?\#] ))?(?:\?([^\#] ))?(?:\#([^\s] ))?$/i, element: ['source','scheme','subscheme','user','pass','host','port','path','query','fragment'] }, simple: { pattern: /^(?[a-z] ):\/\/)?((?:[a-z0-9_-] \.) [a-z]{2,})(?:\/)([^:\?] )?(?[\?|\#])([^\?] ))?$/i, element: ['source','scheme','host','path','delimiter','query'] } }; var mode = simpleMode !== false ? 'simple' : 'complex'; var pattern = parameter[mode].pattern; var element = parameter[mode].element; if (!href) return uri; var matches = href.match(pattern); if (matches) { // -------------------- // iterate over the matches array and populate uri properties // using the respective element parameter as the name. // NOTE: set raw property type as String to make inArray() // work properly with instanceof. // -------------------- for (var i=0; i < matches.length; i ) uri[element] = new String(matches || ); // -------------------- // create an array, hostArray, from host, for example, // host=www.google.com and hostArray=[www,google,com] // -------------------- uri.hostArray = uri.host.split(.); // -------------------- // create an array, qsArray, from query, for example, // query='hl=en&q=javascript&btnG=Search&aq=f&aqi=g10&aql=&oq=&gs_rfai=' // qsArray=[{hl:'en'},{q:javascript}, ... ,(qs_rfai:''}] // // $0=entire match, $1=capture 1, $2=capture 2 // must include $0 even though it is unused so // the replace works properly // -------------------- uri.qsArray = []; uri.query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) { if ($1) uri.qsArray[$1] = $2; } ); } //non-standard urls require a fail-safe that relies on simply splitting the href function splitLink(href) { // split the href on '/' var linkParts = href.split(/); // need domain and path if ((linkParts == null) || (linkParts.length < 2)) return false; var uri = { delimiter: (linkParts[3]).substring(0,1), host: linkParts[2], hostArray: (linkParts[2]).split('.'), path: (linkParts[3]).substring(1), qsArray: {}, query: '', scheme: (linkParts[0]).substring(0, linkParts[0].length-1), source: href }; return uri; } if (!uri.host) uri = splitLink(href); return uri; }; // general functions searchshield.arrayKeys = function (array) { var keys = new Array(); for(k in array) keys.push(k); return keys; }; searchshield.inArray = function (key, array, caseSensitive, exactMatch) { if (! array instanceof Array) return false; if (caseSensitive !== true) caseSensitive = false; if (exactMatch !== false) exactMatch = true; if (key instanceof String) { for (var i=0; i < array.length; i ) { var k = caseSensitive ? key.valueOf() : key.valueOf().toLowerCase(); var a = caseSensitive ? array : array.toLowerCase(); if(exactMatch && k === a) return true; else if (!exactMatch && (-1 !== k.indexOf(a))) return true; } } else if (key instanceof Array) { for (var i=0; i < array.length; i ) for (var j=0; j < key.length; j ) { var k = caseSensitive ? key[j] : key[j].toLowerCase(); var a = caseSensitive ? array : array.toLowerCase(); if (exactMatch && k === a) return true; else if (!exactMatch && (-1 !== k.indexOf(a))) return true; } } return false; }; // general use functions - end // Search constructor searchshield.Search = function() { this.doc = null; this.engine = null; this.engines = null; this.links = null; this.uri = null; this.searchHash = null; this.checkUrl = null; this.useLocalImgs = null; this.clockUrl = null; // create engine list (actually key/value object will be used) this.engineList = {}; }; searchshield.Search.prototype.getSearchNames = function() { // order is important var names = [ 'Google', 'AVGGoogle', 'AltaVista', 'AVGYahoo', 'Yahoo', 'Bing', 'MSN', // MSN redirects to BING 'Baidu', 'Earthlink', 'AOL', 'Ask', 'Yandex', 'Seznam', 'Webhledani', 'eBay', ///temp 'Digg', 'Slashdot', 'Twitter', 'GMail', 'Facebook' ]; return names; }; searchshield.Search.prototype.detectEngine = function(href) { if (!href) return; var aEng = searchshield.Search.prototype.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { if (searchshield[aEng 'SearchEngine'].prototype.validSearch(href)) return aEng; } return; }; searchshield.Search.prototype.addEngine = function(engine) { if (!this.engines) this.engines = new Array(); this.engines.push(engine); }; searchshield.Search.prototype.addLink = function(inElement, inHref) { if (!this.links) this.links = new Array(); var hrefHash; try { hrefHash = searchshield.avgCallFunc(this.doc, 'GetHash', inHref); } catch (e){} var newNode = { element: inElement, href: inHref, hash: hrefHash, search: this.searchHash }; this.links.push(newNode); return newNode; } // process the search result page after all search engines have been added searchshield.Search.prototype.process = function(doc) { // only process when searchshield is enabled if (0 == searchshield.avgCallFunc(doc, 'GetSearchEnabled')) return; this.doc = doc; this.href = this.doc.location.href; this.uri = searchshield.parseLink(this.href); try { this.searchHash = searchshield.avgCallFunc(this.doc, 'GetHash', this.href); // get any previously active engine this.engine = this.engineList[this.searchHash.toString()]; } catch (e) {} /* Process Steps: 1. Add all supported search engines 2. Identify the active search engine 3. Get all document links and add AVG images */ // STEP 1 - Add all supported search engines if (!this.engines) { var aEng = xplSearch.getSearchNames(); var aEngLen = aEng.length; for (var i=0; i < aEngLen; i ) { xplSearch.addEngine(new searchshield[aEng 'SearchEngine'](this)); } } // search the engines if we didn't find one if (!this.engine) { // STEP 2 - Identify the active search engine var engLen = this.engines.length; for (var i = 0; i < engLen; i ) { if (this.engines.validSearch()) { this.engine = this.engines; break; } } // create a new engine instance to store this.engineList[this.searchHash.toString()] = this.engine; // init this search, if < 1 either an error or disabled //var sdkInit = 0; //try { // sdkInit = xpl_sdk.SXPL_InitSearch(this.href); //} //catch(e){} //if (sdkInit < 1) // return false; } // return immediately if there is not an active search engine if (!this.engine) return false; try { // base url to check for icons this.checkUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '1'); // check if using linked or local icons this.useLocalImgs = !searchshield.getUrlContents(this.checkUrl); // get the clock url this.clockUrl = searchshield.avgCallFunc(this.doc, 'GetIconUrl', '0'); } catch(e){} // STEP 3 - Get all document links and add AVG images var alltags = this.doc.getElementsByTagName(*); // this method works for IE, FF and Chrome for (var i=0; i < alltags.length; i ) { // ignore verdicts if (alltags.id && (alltags.id.indexOf(LXPLSS_) != -1)) continue; //should the link be included? Make sure includeLink always returns an href else FALSE, var href = this.engine.includeLink(alltags); if (!href) continue; var newNode = this.addLink(alltags, href); this.engine.addImage(newNode, this.clockUrl, false); } return (this.links ? this.links.length : false); }; //////////////// SEARCH //////////////// //////////////// SEARCH ENGINE //////////////// // Interface for a SearchEngine object searchshield.SearchEngine = function(search) { this.search = search; this.type = 'standard'; this.processFrames = false; this.new_links = true; this.onlyPrimaries = true; this.inline = { clockImage: linkscanner://clock12.png, image: [ linkscanner://safe12.png, linkscanner://caution12.png, linkscanner://warning12.png, linkscanner://blocked12.png ], color: { border: [#00A120;, #EAA500;, #F57301;, #D20003;], background: [#C3E5CA;, #FEEFAE;, #FFD3B0;, #F5D4C1;] } }; this.filter_urls = [ ad.doubleclick.net, ads1.revenue.net, aslads.ask.com, bluestreak.com, clickbacktrack.net, clickbank.net, clickboothlnk.com, clickmanager.com, clickserve.cc-dt.com, clickserve.dartsearch.net, clicktraxmedia.com, clk.atdmt.com, dpi-digialphoto.com, feedpoint.net, hypertracker.com, jdoqocy.com, kqzyfj.com, m1428.ic-live.com, mediaplex.com, mr.mdmngr.com, n339.asp-cc.com, offeredby.net, offerweb.com, pinktrax.com, pinktrax.com, pixel1523.everesttech.net, qckjmp.com, r.rd06.com, revenuewire.net, s0b.bluestreak.com, s2.srtk.net, servedby.advertising.com, store.yahoo.com, tf8.cpcmanager.com, thetoptracker.com, track.searchignite.com, tracking.searchmarketing.com, www.dpbolvw.net, www.rkdms.com, www.yellowbookleads.com ]; this.shortened_urls = [ 3.ly, bit.ly, is.gd, tr.im, short.to, tiny.cc, tinyurl.com ]; this.showCleanVerdicts = true; this.showLowRiskVerdicts = true; this.showMedRiskVerdicts = true; this.VeriSignSplit = searchshield.VERISIGN_SPLIT_NOTEST; }; searchshield.SearchEngine.prototype.flyoverExists = function (doc) { return !!doc.getElementById(XPLSS_Flyover); }; searchshield.SearchEngine.prototype.inlineExists = function (doc) { return !!doc.getElementById(XPLSS_InlineFlyover); }; searchshield.SearchEngine.prototype.validSearch = function(href) { return false; }; searchshield.SearchEngine.prototype.includeLink = function(link) { return false; }; searchshield.SearchEngine.prototype.insertNodes = function(node, doc) { var element = node.element; var parentNode = node.element.parentNode; if (parentNode == null) { // try and find element again based on the hash element = doc.getElementById(xplid_ node.hash); parentNode = !!element ? element.parentNode : null; } var insertNode = !!element ? element.nextSibling : null; while ((insertNode != null) && (insertNode.tagName != null) && (insertNode.tagName == SPAN)) { insertNode = insertNode.nextSibling; } return [insertNode, parentNode]; }; searchshield.SearchEngine.prototype.addImage = function(node, image, hidden) { var element = node.element; var hash = node.hash; var score = node.score; // set verdict display configuration var doc = element.ownerDocument; if (!doc.getElementById('XPLSS_Flyover')) searchshield.initFlyover(doc, this); // get the proper insertion point for the image var insertNodes = this.insertNodes(node, doc); var insertNode = insertNodes[0]; var parentNode = insertNodes[1]; if (!parentNode) return; // see if we already have an image if ((insertNode != null) && (insertNode.id != null) && (insertNode.id.indexOf(XPLSS_) > -1)) { return; } // mark search result anchor so it isn't processed repeatedly if (score == undefined) element.setAttribute(avglschecked, hash S this.VeriSignSplit); // create a new image var img = doc.createElement('img'); img.src = image; img.id = XPLSS_ hash; img.style.borderStyle = none; img.style.margin = 0 3px; // for IE, specify these style attributes to prevent inadvertent inheritance from parent if (img.width && img.height) { img.style.width = img.width 'px'; img.style.height = img.height 'px'; } // apply custom element styles this.updateElementStyle(img, this.addImageStyle); // create the link element var anchor = doc.createElement(A); anchor.setAttribute(id, LXPLSS_ hash); if ((hidden != null) && (hidden == true)) { // hiding the parent will also hide its child nodes anchor.style.display = none; } // Default anchor styles //Over-ride possible border style with inline declaration anchor.style.borderStyle = none; // apply custom element styles this.updateElementStyle(anchor, this.addAnchorStyle); if (score == searchshield.SCORE_SS_VERISIGN) { anchor.style.textDecoration = none; anchor.style.background = none; } // append the image to the link anchor.appendChild(img); // insert the node as either a sibling or a child if (insertNode != null) parentNode.insertBefore(anchor, insertNode); else parentNode.appendChild(anchor); return anchor; }; searchshield.SearchEngine.prototype.updateImage = function (hash, search, score, image, alt_image, flyover, click_thru, altClick_thru) { var updated = false; var frameDoc = this.search.doc; var docFrames = frameDoc.frames; var frameElem; if (docFrames && this.processFrames) { for (var i=0; i < docFrames.length; i ) { try { if (docFrames.document.getElementById(hash)) { frameElem = docFrames.frameElement; frameDoc = docFrames.document; break; } } catch(err){} } } while ((element = frameDoc.getElementById(hash)) != null) { // check configuration to determine if verdict display property var showVerdict = true; var nSeverity = Number(score - 1); switch (nSeverity) { case searchshield.XPLCHECK_RESULT_SEV_LOW: showVerdict = this.showLowRiskVerdicts; break; case searchshield.XPLCHECK_RESULT_SEV_MED: showVerdict = this.showMedRiskVerdicts; break; case searchshield.XPLCHECK_RESULT_SEV_NONE: showVerdict = this.showCleanVerdicts; break; default: if (score == searchshield.SCORE_SS_VERISIGN) showVerdict = this.showCleanVerdicts; break; } // remove image if no url specified if ((!showVerdict) || (image == null) || (image.length < 1)) { // hide the parent anchor node element.parentNode.style.display = none; // mark the id as being hidden (element is the image) element.id = element.id H; updated = true; // if not a verisign score if (score != searchshield.SCORE_SS_VERISIGN) continue; } // cleanup flyover, replace any new lines or single quotes flyover = searchshield.CleanupHTML(flyover); // mark the id as having been updated element.id = element.id U score; element.src = image; element.attachEvent(onmouseover, function(e){avglsflyover.popup(e, hash, search, flyover)}); element.attachEvent(onmouseout, function(e){avglsflyover.hide(e)}); // check for attribute updates (elementAttribute is an associative array (i.e., object) if (this.elementAttribute) { for (a in this.elementAttribute) { if(this.elementAttribute[a]) element.setAttribute(a, this.elementAttribute[a]); } } // To dynamically reduce verdict image size if it causes its container to scroll // when not showing alt images determine if the element containing // the verdict image is scrolling and decrease the image size by // the scroll amount (min size is 80% or original) var reduceBy = 0.8; var scrl = 0; if (!alt_image || this.omitAltImage || this.VeriSignSplit == searchshield.VERISIGN_SPLIT_TESTB) { try{ var maxLoop = 5; var cN = element.parentNode.parentNode; //image->anchor->containerNodes... while (cN && maxLoop--) { if (cN.tagName == DIV || cN.tagName == SPAN) { // get object height depending on ie document mode var clientHeight = (cN.clientHeight == 0 || (this.search.doc.documentMode && this.search.doc.documentMode < 8)) ? cN.offsetHeight : cN.clientHeight; scrl = cN.scrollHeight - clientHeight; break; } cN = cN.parentNode; } if (0 < scrl) { var eH = (element.height - scrl)/element.height; if (reduceBy > eH) eH = reduceBy; var newDim = Math.ceil(eH*element.height); element.height = newDim; element.width = newDim; element.style.height = newDim px; element.style.width = newDim px; } } catch(e){} } // set default style attributes element.style.display = ; // if verisign icon showing move our icon up for better centering of the 2 // except for IE7 browser - it does not like this style try { var ieVersion = parseFloat(navigator.appVersion.split(MSIE)[1]); if (alt_image && (alt_image.length > 0) && ieVersion != 7) element.style.verticalAlign = 10%; } catch(err){}; // apply custom element styles this.updateElementStyle(element, this.updateImageStyle) // update the click thru var link = this.search.doc.getElementById(L hash); if (link) { link.href = click_thru; link.id = link.id U score; } updated = true; // add the alternate image if supplied BUT not on avg yahoo if ((alt_image) && (alt_image.length > 0) && (!this.omitAltImage) && (this.VeriSignSplit != searchshield.VERISIGN_SPLIT_TESTB)) { var vhash = hash.substring(hash.indexOf(_) 1); // create a temporary link node var tmp_node = { element: element.parentNode, href: altClick_thru, hash: vhash VU score, search: this.searchHash, score: score }; var altAnchor = this.addImage(tmp_node, alt_image, false); if (altAnchor && altAnchor.firstChild) { altAnchor.firstChild.setAttribute(onmouseover, ); altAnchor.href = altClick_thru; } } } if (updated != false) { this.resizeFrame(frameElem); return true; } return false; }; searchshield.SearchEngine.prototype.updateElementStyle = function (element, elementStyle) { if (elementStyle) { // a NULL attribte value will unset it for(attr in elementStyle) { try { if (element.style.setAttribute) element.style.setAttribute(attr, elementStyle[attr]); else element.style[attr] = elementStyle[attr]; } catch(err){} } } }; searchshield.SearchEngine.prototype.resizeFrame = function (frameElem) { // resize frame to prevent unwanted scrolling after inserting verdicts // ignore inline and non-frame engines if ((this.type == 'inline') || (!this.processFrames)) return; // ensure all required elements are available if ((frameElem == null) || (frameElem.style == null) || (frameElem.contentWindow == null)) return; // if frame is scrolling vertically then resize var frameHeight = parseInt(frameElem.style.height, 10); if (!isNaN(frameHeight) && (frameHeight < frameElem.contentWindow.document.body.scrollHeight)) frameElem.style.height = frameElem.contentWindow.document.body.scrollHeight 'px'; return; }; searchshield.SearchEngine.prototype.getImgElement = function (element) { // return an xpl img element associated with a given element if (element == null) return null; // go up the parent tree looking for a header or div while ( (element.parentNode != null) && (element.tagName.charAt(0) != H) && (element.tagName.charAt(0) != D) && (element.tagName.charAt(0) != T) ) { element = element.parentNode; } // if all the way to the top, nothing if ((element.tagName == HTML) || (element == null)) return null; // get image tags, if none we are done var imgTags = element.getElementsByTagName(IMG); if ((imgTags == null) || (imgTags.Length < 1)) return null; for (var i = 0; i < imgTags.length; i ) { if ((imgTags.id == null) || (imgTags.id.indexOf(XPLSS_) == -1)) continue; return imgTags; } // else didn't find anything return null; }; searchshield.SearchEngine.prototype.setRatingsConfig = function (doc) { // get verdict configuration, need at least severity var results = searchshield.avgCallFunc(doc, 'GetRatingsConfig'); var parts = !!results ? results.split('::') : null; if (parts != null && parts.length >= 5) { //if set to default then get config value if (this.showCleanVerdicts === true) this.showCleanVerdicts = (parseInt(parts[0]) == 1) ? 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; // create the popup box var box = doc.createElement(DIV); try { box.setAttribute(id, XPLSS_InlineFlyover); box.style.visibility = hidden; box.style.left = -5000px; box.style.position = absolute; box.style.zIndex = 9999; box.style.padding = 0px 0px; box.style.marginLeft = 0px; box.style.marginTop = 0px; box.style.overflow = hidden; box.style.wordWrap = break-word; box.style.color = black; box.style.fontSize = 10px; box.style.textAlign = left; box.style.lineHeight = 130%; 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)}, false); return; } } //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 ) { imageElem.setAttribute(title, ); imageElem.attachEvent(onmouseover, function(e){avglsinlineflyover.popup(e, html)}); imageElem.attachEvent(onmouseout, function(e){avglsinlineflyover.hide(e)}); } } }; // add the image to the page searchshield.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.border = none; img.style.padding = 0 3px; img.style.margin = 0; img.style.display = inline; if ((html && html.length > 0) || (blUrl != undefined)) { img.setAttribute(title, ); img.attachEvent(onmouseover, function(e){avglsinlineflyover.popup(e, html, 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.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; // Domains valid for google searches, must start with '.' var valid_domains = new Array(.google.co, .mozilla.co); // For Google the host must match: // .google.com OR // .google.co.XX where XX is a country code // .google.XX where XX is a country code // Where any subdomain can come before the top level domain var domLen = valid_domains.length; for (var i = 0; i < domLen; i ) { var domainLen = domain.length; var valid_domain_len = valid_domains.length; var tldPos = domain.indexOf(valid_domains); if (tldPos > -1) { if (domain.charAt(tldPos valid_domain_len) == 'm') hostMatch = true; else if ((domain.charAt(tldPos valid_domain_len) == '.') && ((domainLen - tldPos) == valid_domain_len 3)) hostMatch = true; } else { // get the form .google. to check the length of var dot_pos = valid_domains.indexOf(.,1); var valid_short_name = valid_domains.substring(0, dot_pos 1); tldPos = domain.indexOf(valid_short_name); if ((tldPos > -1) && ((domainLen - tldPos) == valid_domain_len)) hostMatch = true; } if (hostMatch) { // replace beginning of domain with www.google since links will refer back to it if ((i > 0) && (tldPos > -1)) { var last_dot = domain.indexOf(.,tldPos 1) if (last_dot > -1) domain = www.google domain.substring(last_dot); } break; } } if (hostMatch) { // using ajax engine if ((path.indexOf(search?) == 0) || (path.indexOf(sponsoredlinks?) == 0) || (path.indexOf(webhp?) == 0) || (path.indexOf(webhp#) == 0) || (path.indexOf(#q=) == 0) || (path.indexOf(#hl=) == 0) || (path.indexOf(#sclient=) == 0)) { return true; } } return false; }; searchshield.GoogleSearchEngine.prototype.includeLink = function(tag) { var href = ; var outHref = false; var findStr = ; // check for interstitials if (searchshield.DoesURLContain(tag.href, this.search.uri.host)) { findStr = this.search.uri.host /interstitial?; if (tag.className == l && tag.href) { if (tag.href.indexOf(findStr) != -1) { findStr = ?url=; var pos = tag.href.indexOf(findStr); if (pos !== -1) { pos = 5; outHref = tag.href.substring(pos); if (searchshield.FilterUrl(outHref, this.filter_urls)) return false; return outHref; } } } if (tag.className == sla) { findStr = /url?q=; urlPos = tag.href.indexOf(findStr); if (urlPos != -1) { urlPos = 7; outHref = tag.href.substring(urlPos); return outHref; } } // if an ad id if ((tag.id.indexOf(pa) == 0) || (tag.id.indexOf(an) == 0) || (tag.className == resultLink)) { var urlPos = -1; // ads now need unescaping href = unescape(tag.href); findStr= /url?sa=; if (href.indexOf(findStr) != -1) { // first kind, locate real url findStr= &q=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 3; // puts it on the http } if (urlPos == -1) { findStr = /pagead/iclk?sa=; if (href.indexOf(findStr) != -1) { // second kind, locate real url findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } if (urlPos == -1) { if (href.indexOf(/aclk?sa=) != -1) { // third kind urlPos = href.indexOf(&q=http); if (urlPos != -1) urlPos = 3; // puts it on the http else { urlPos = href.indexOf(&lp=http); if (urlPos != -1) urlPos = 4; else { findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } } } if (urlPos == -1) { if (href.indexOf(/url?cad=) != -1) { // fourth kind urlPos = href.indexOf(&q=http); if (urlPos != -1) urlPos = 3; // puts it on the http } } if (urlPos != -1) { outHref = 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, this.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, this.filter_urls)) return false; return outHref; } } // recommended link - use following to see one // http://www.google.cz/search?hl=cs&q=warey&btnG=Hledat&lr=lang_cs // elem parent class = r // href must contain - url? and q=http var parentNode = tag.parentNode; if (parentNode && (parentNode.className.toLowerCase() == r)) { href = tag.href; if (href && (href.indexOf(/url?) != -1)) { // locate the real url var urlPos = href.indexOf(q=http); if (urlPos != -1) { urlPos = 2; outHref = href.substring(urlPos); // include entire param up to '&' var ampPos = outHref.indexOf(&); if (ampPos != -1) outHref = outHref.substring(0, ampPos); return outHref; } } } } // no link to self else if (tag.className && (tag.className.charAt(0) == l || tag.className == sla)) { // check for any images on the link if (0 === tag.getElementsByTagName(IMG).length) return tag.href; } // else nothing return false; }; /////////////// GOOGLE /////////////// /////////////// AVG GOOGLE SEARCH ENGINE /////////////// searchshield.AVGGoogleSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.onlyPrimaries = false; }; searchshield.AVGGoogleSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.AVGGoogleSearchEngine.prototype.constructor = searchshield.AVGGoogleSearchEngine; searchshield.AVGGoogleSearchEngine.prototype.name = avggoogle; // the name by which the search engine is known (always lowercase) searchshield.AVGGoogleSearchEngine.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.avg.com) > -1) { // ads link back to google return true; } return false; }; searchshield.AVGGoogleSearchEngine.prototype.includeLink = function(tag) { var outHref = false; var findStr = ; // check for interstitials if (searchshield.DoesURLContain(tag.href, google.com)) { // link back to self - DIV elem GrandParent class of res1 or res3 is Sponsored Link var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == DIV) && ((grandParentNode.className.toLowerCase() == res1) || (grandParentNode.className.toLowerCase() == res3))) { var urlPos = -1; // ads now need unescaping href = unescape(tag.href); if (urlPos == -1) { if (href.indexOf(/aclk?sa=) != -1) { findStr = &adurl=http; urlPos = href.indexOf(findStr); if (urlPos != -1) urlPos = 7; // puts it on the http } } if (urlPos != -1) { outHref = 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, this.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, this.filter_urls)) return false; return outHref; } } } } } // no link to self else { var parentNode = tag.parentNode; if (parentNode) { var grandParentNode = tag.parentNode.parentNode; if (grandParentNode) { if ((grandParentNode.tagName == DIV) && (grandParentNode.className.toLowerCase() == res2)) { // check for any images on the link if (0 === tag.getElementsByTagName(IMG).length) return tag.href; } } } } // else nothing return false; } /////////////// AVG GOOGLE /////////////// /////////////// YAHOO SEARCH ENGINE /////////////// searchshield.YahooSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; }; searchshield.YahooSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.YahooSearchEngine.prototype.constructor = searchshield.YahooSearchEngine; searchshield.YahooSearchEngine.prototype.name = yahoo; searchshield.YahooSearchEngine.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; // re stitch the uri path and query elements to // use existing logic var path = uri.path uri.delimiter uri.query; // For Yahoo the host must match: // search.yahoo.com OR // xx.search.yahoo.com where xx country code OR // search.yahoo.co.xx OR // for Yahoo China: one.cn.yahoo.com & search.cn.yahoo.com if ((uri.host.indexOf(search.yahoo.co) != -1) || (uri.host.match(/^(search|one)(\.[a-z]{2}\.yahoo\.com)$/))) { if ((path.indexOf(search?) == 0) || (path.indexOf(search;) == 0) || (path.indexOf(s?p=) === 0)) { return true; } } return false; }; searchshield.YahooSearchEngine.prototype.includeLink = function(tag) { var href = ; var outHref = ; var findStr = ; // yahoo likes to encode the url href = unescape(tag.href); if ((tag.className.indexOf(yschttl) != -1) || (tag.className.indexOf(spt) != -1)) { var da = href.indexOf(**); var ad = href.indexOf(*-); if (da != -1) outHref = href.substring(da 2); else if (ad != -1) outHref = href.substring(ad 2); else outHref = href ; if (outHref.toLowerCase().indexOf(overture.) !== -1) return false; } else if ((tag.tagName) && (tag.tagName === A) && (!tag.className)) { var tagParent = tag.parentNode; // if anchor without className then search parentNodes if ((tagParent) && (tagParent.tagName !== EM) && (searchshield.getParentNodeByClassName(yst-web, tag, 4))) { // China Yahoo support outHref = href; } else if ((tagParent) && (tagParent.tagName === H3) && (!!searchshield.getParentNodeById(WS2m,tag, 5))) { // Japan Yahoo support var da = href.indexOf(**); if (da !== -1) outHref = href.substring(da 2); } else if ((tagParent) && (tagParent.className !== c) && (tagParent.parentNode.id !== fpn) && (!!searchshield.getParentNodeByClassName(ymc, tag, 7))) { // Korea Yahoo support - when not caught by yschttl var da = href.indexOf(**); if (da !== -1) outHref = href.substring(da 2); } } else if (!this.onlyPrimaries) { findStr = &yargs=; var yargs = href.indexOf(findStr); if (yargs != -1) { outHref = href.substring(yargs findStr.length); // check for prefix if (outHref.indexOf(://) == -1) outHref = http:// outHref; // if inside an , probably a paypal link, don't include if (tag.parentNode && (tag.parentNode.tagName == I)) return false; } } // filter domains // split the url based on '/' var parts = !!outHref ? outHref.split('/') : null; // Filter out domains that match any of the search engine's names if (!parts || !parts[2]) return false; var domain = parts[2]; if ((domain.indexOf(rdrjp.yahoo.com) != -1) || (domain.indexOf(rdrkrs.yahoo.com) != -1) || (domain.indexOf(rdrtpe.yahoo.com) != -1) || (domain.indexOf(rdrird.yahoo.com) != -1) || (domain.indexOf(rdrhk2.yahoo.com) != -1) || (domain.indexOf(rdrsg1.yahoo.com) != -1) || (domain.indexOf(rdrin2.yahoo.com) != -1) || (domain.indexOf(rdre1.yahoo.com) != -1) || (domain.indexOf(rdrw1.yahoo.com) != -1) ) { return false; } // set for yahoo to get parent node for image insertion var hash = searchshield.avgCallFunc(this.doc, 'GetHash', outHref); tag.setAttribute(id, xplid_ hash); return outHref; }; /////////////// YAHOO SEARCH ENGINE /////////////// /////////////// AVG YAHOO SEARCH ENGINE /////////////// searchshield.AVGYahooSearchEngine = function(search) { searchshield.SearchEngine.call(this, search); this.showCleanVerdicts = false; }; searchshield.AVGYahooSearchEngine.prototype = new searchshield.SearchEngine(); searchshield.AVGYahooSearchEngine.prototype.constructor = searchshield.AVGYahooSearchEngine; searchshield.AVGYahooSearchEngine.prototype.name = avgyahoo; searchshield.AVGYahooSearchEngine.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; //path may be 'avg/search' or 'search' var pathArray = uri.path.split(/); var avg = pathArray[0]; // re stitch the uri path and query elements // to use existing logic var path = (undefined == pathArray[1]) ? pathArray[0] : pathArray[1]; path = uri.delimiter uri.query; // For AVG Yahoo classic the host must match: // yhs.search.yahoo.com OR // .yhs.search.yahoo.com if (domain.indexOf(yhs.search.yahoo.co) != -1) { if ((avg == avg) &&a
-
Insprut kom 2005....
-
Hej Har letat överallt på nätet , men inte hittat information om Mercury 90hk 2004 4 takt Är det någon som vet ? Hafan
-
hej Köpte en trailer ! tack för tipsen. Jag kommer att flytta den ganska ofta,
-
Det finns bara ett medel som funkar ritktigt bra--- Shipshape !!!. Jag har provat flera olika märken, men med detta gör riktigt rent.
-
Hej Jag stoppade på en grovis dammsugare och sög ur allt vatten i toan genom slangen som går till gråtanken. Ställde den i öppet läge. Den blev garanterat snustorr. Sög även ur slangarna till dusch och kranar. Jag har tidigare fyllt toan med glykol och spolat det till septitanken. Hafan
-
Hej Är det någon som vet om det är brytare på en Mercruiser 1996 7,4l. Jag ska justera lite och behöver veta hur man gör, Hur många grader ska tändningen stå inställd på. Tacksam för tips.
-
Jag är på gång att köpa en 26 fotare utan trailer. Hur trixar man av den hemma på gården från det hyrda släpet ? Funderar på att lägga upp den på lastpallar, men hur får man över den på dom. Är det någon som har förslag på hur jag ska bära mig åt. Stefan