PageSourceSearch

https://harrydaenergi.se/cache/js/content/modules/cookies-settings/js/cookies-settings.js?v=1729860013

js harrydaenergi.se collected 2026-10-08 21:30:10 UTC 3,760 bytes, 32 lines download raw bytes

1function getCookie(name)
2{var re=new RegExp(name+"=([^;]+)");var value=re.exec(document.cookie);return(value!=null)?unescape(value[1]):null;}
3function DeleteCookie(name)
4{var host=window.location.hostname.split(".");var domain="."+host[host.length-2]+"."+host[host.length-1];if(name.slice(-1)==="%")
5{var pattern=name.substring(0,name.length-1);var cookies=document.cookie.split(';');for(x=0;x<cookies.length;x++)
6{var name=cookies[x].split("=");name=name[0].trim();var test=name.substring(0,pattern.length);if(test==pattern)
7{document.cookie=name+"=; Path=/; Domain="+domain+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.cookie=name+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";}}}
8else
9{document.cookie=name+'=; Path=/; Domain='+domain+'; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';document.cookie=name+'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';}}
10function setCookiesSettings(performance,marketing,necessary,functionality)
11{var s={performance:performance,marketing:marketing,necessary:necessary,functionality:functionality}
12localStorage.setItem("CookiesSettings",JSON.stringify(s));}
13jQuery(function($){var CookiesSettings=localStorage.getItem("CookiesSettings");if(CookiesSettings===null)
14{jQuery("#CookiesSettings").fadeIn();}
15jQuery("#CookiesSettings button.acceptAll").on("click",function(){setCookiesSettings(1,1,1,1);jQuery("#CookiesSettings .saved_message").show();$("#CookiesSettings .switch input").prop('checked',true);setTimeout(function(){jQuery("#CookiesSettings").fadeOut(1000);},1000);});jQuery("#CookiesSettings .showSettings").on("click",function(){jQuery("#CookiesSettings .general").hide();jQuery("#CookiesSettings .settings").fadeIn();});jQuery("#CookiesSettings .settings td i, #CookiesSettings .settings td .show-more").on("click",function(){if(jQuery("#CookiesSettings .settings tr."+$(this).children().attr("show")+" .content").is(":visible")===false){jQuery("#CookiesSettings .settings tr."+$(this).children().attr("show")+" .content").slideToggle(400);$(this).children().toggleClass("fa-question-circle fa-times");}else{jQuery("#CookiesSettings .settings tr."+$(this).children().attr("show")+" .content").slideToggle(400);$(this).children().toggleClass("fa-question-circle fa-times");}});jQuery("#CookiesSettings button.saveChoises").on("click",function(){var p=0;var m=0;var n=0;var f=0;if(jQuery("#CookiesSettings input.performance").is(":checked"))
16p=1;if(jQuery("#CookiesSettings input.marketing").is(":checked"))
17m=1;if(jQuery("#CookiesSettings input.necessary").is(":checked"))
18n=1;if(jQuery("#CookiesSettings input.functionality").is(":checked"))
19f=1;setCookiesSettings(p,m,n,f);jQuery("#CookiesSettings .saved_message").show();setTimeout(function(){jQuery("#CookiesSettings").fadeOut(1000);},1000);});$(".show_cookies_settings").on("click",function(){var CookiesSettings=JSON.parse(localStorage.getItem("CookiesSettings"));if(CookiesSettings===null||CookiesSettings.marketing==1)
20{jQuery("#CookiesSettings input.marketing").prop("checked",true);}
21else
22{jQuery("#CookiesSettings input.marketing").prop("checked",false);}
23if(CookiesSettings===null||CookiesSettings.performance==1)
24{jQuery("#CookiesSettings input.performance").prop("checked",true);}
25else
26{jQuery("#CookiesSettings input.performance").prop("checked",false);}
27if(CookiesSettings===null||CookiesSettings.functionality==1)
28{jQuery("#CookiesSettings input.function").prop("checked",true);}
29else
30{jQuery("#CookiesSettings input.function").prop("checked",false);}
31jQuery("#CookiesSettings .saved_message").hide();jQuery("#CookiesSettings .settings").hide();jQuery("#CookiesSettings .general").show();jQuery("#CookiesSettings").fadeIn();})
32$(".change-cookiesettings").on("click",function(e){e.preventDefault();$("#CookiesSettings").fadeIn();});});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.