PageSourceSearch

https://kubawest.de/plugins/cookielaw/source/cookielawforce.js

js kubawest.de collected 2026-10-05 05:40:12 UTC 6,882 bytes, 141 lines download raw bytes

1/*
2Many thanks to https://cookieinfoscript.com/
3
4Copyright
5
6Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
10THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
11*/
12
13!function(e){"use strict";
14
15
16
17function t(e,t)
18{
19var i=!1,o=!0,n=e.document,s=n.documentElement,r=n.addEventListener?"addEventListener":"attachEvent",
20a=n.addEventListener?"removeEventListener":"detachEvent",c=n.addEventListener?"":"on",
21
22l=function(o){("readystatechange"!=o.type||"complete"==n.readyState)&&(("load"==o.type?e:n)[a](c+o.type,l,!1),!i&&(i=!0)&&t.call(e,o.type||o))},
23p=function(){try{s.doScroll("left")}catch(e){return void setTimeout(p,50)}l("poll")};
24
25if("complete"==n.readyState)t.call(e,"lazy");
26else{if(n.createEventObject&&s.doScroll){try{o=!e.frameElement}catch(h){}o&&p()}n[r](c+"DOMContentLoaded",l,!1),n[r](c+"readystatechange",l,!1),e[r](c+"load",l,!1)}
27}
28
29
30
31var i=e,
32o=i.document,
33n="cbinstance",
34
35
36
37s=
38{
39get:function(e){return decodeURIComponent(o.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},
40set:function(e,t,i,n,s,r)
41{
42if(!e||/^(?:expires|max\-age|path|domain|httponly|samesite|secure)$/i.test(e))return!1;
43var a="";if(i)switch(i.constructor){case Number:a=1/0===i?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+i;break;
44case String:a="; expires="+i;break;case Date:a="; expires="+i.toUTCString()}return o.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(s?"; domain="+s:"")+(n?"; path="+n:"")+(r?"; httponly; SameSite=Strict; secure":""),!0
45},
46
47has:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(o.cookie)},
48remove:function(e,t,i){return e&&this.has(e)?(o.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(i?"; domain="+i:"")+(t?"; path="+t:""),!0):!1}
49},
50
51
52
53r=
54{
55merge:function(){var e,t={},i=0,o=arguments.length;if(0===o)return t;for(;o>i;i++)for(e in arguments[i])Object.prototype.hasOwnProperty.call(arguments[i],e)&&(t[e]=arguments[i][e]);return t},
56str2bool:function(e){switch(e=""+e,e.toLowerCase()){case"false":case"no":case"0":case"":return!1;default:return!0}},
57
58get_data_attribs:function(e)
59{
60var t={};
61if(Object.prototype.hasOwnProperty.call(e,"dataset"))t=e.dataset;else{var i,o=e.attributes;for(i in o)if(Object.prototype.hasOwnProperty.call(o,i)){var n=o[i];if(/^data-/.test(n.name)){var s=r.camelize(n.name.substr(5));t[s]=n.value}}}return t
62},
63
64normalize_keys:function(e){var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r.camelize(i);t[o]=e[o]?e[o]:e[i]}return t},
65camelize:function(e){for(var t="-",i=e.indexOf(t);-1!=i;){var o=i===e.length-1,n=o?"":e[i+1],s=n.toUpperCase(),r=o?t:t+n;e=e.replace(r,s),i=e.indexOf(t)}return e},
66find_script_by_id:function(e){for(var t=o.getElementsByTagName("script"),i=0,n=t.length;n>i;i++)if(e===t[i].id)return t[i];return null}
67},
68
69
70
71a=r.find_script_by_id("cookielawforce"),
72c=e.cookielaw=function(e){this.init(e)};
73
74
75
76c.prototype=
77{
78cookiejar:s,init:function(t)
79{
80this.inserted=!1,this.closed=!1,this.test_mode=!1;
81
82var i="We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.",o="More info";
83
84if(this.default_options=
85{
86cookie:"CookieLaw",closeText:"X",cookiePath:"./",debug:!1,expires:1/0,zindex:255,position:"bottom",target:"_blank",message:i,linkmsg:o,moreinfo:"http://wikipedia.org/wiki/HTTP_cookie",instance:n
87},
88this.options=this.default_options,this.script_el=a,this.script_el)
89
90{var c=r.get_data_attribs(this.script_el);this.options=r.merge(this.options,c)}
91t&&(t=r.normalize_keys(t),this.options=r.merge(this.options,t)),n=this.options.instance,this.options.zindex=parseInt(this.options.zindex,10),"string"==typeof this.options.expires&&"function"==typeof e[this.options.expires]&&(this.options.expires=e[this.options.expires]),"function"==typeof this.options.expires&&(this.options.expires=this.options.expires()),this.script_el&&this.run()
92},
93
94log:function(){"undefined"!=typeof console&&console.log.apply(console,arguments)},
95run:function(){if(!this.agreed()){var e=this;t(i,function(){e.insert()})}},
96build_viewport_mask:function(){var e=null;return e},
97agree:function(){return this.cookiejar.set(this.options.cookie,1,this.options.expires,this.options.cookiePath),!0},
98agreed:function(){return this.cookiejar.has(this.options.cookie)},
99close:function(){return this.inserted&&(this.closed||(this.element&&this.element.parentNode.removeChild(this.element),this.closed=!0)),this.closed},
100agree_and_close:function(){return this.agree(),this.close()},
101cleanup:function(){return this.close(),this.unload()},
102unload:function(){return this.script_el&&this.script_el.parentNode.removeChild(this.script_el),e[n]=void 0,!0},
103
104insert:function()
105{
106function e(e,t,i){var o=e.addEventListener?"addEventListener":"attachEvent",n=e.addEventListener?"":"on";e[o](n+t,i,!1)}
107
108this.element_mask=this.build_viewport_mask();var t=this.options.zindex;this.element_mask&&(t+=1);var i=o.createElement("div");
109i.className="cookielawForce",
110i.style.position="fixed",
111i.style.left=0,
112i.style.right=0,
113i.style.zIndex=t,
114"top"===this.options.position?i.style.top=0:i.style.bottom=0,
115
116i.innerHTML='<div class="cookielawMessage">'+this.options.message+'</div><span class="cookielawButton">'+this.options.closeText+'</span><div class="cookielawMoreInfo">'+" <a>"+this.options.linkmsg+"</a></div>",
117
118this.element=i;
119var n=i.getElementsByTagName("a")[0];
120n.href=this.options.moreinfo,
121n.target=this.options.target;
122
123var s=i.getElementsByTagName("span")[0];
124s.style.cursor="pointer";
125
126var c=this;e(s,"click",
127function(){c.agree_and_close()}),
128this.element_mask&&(e(this.element_mask,"click",
129function(){c.agree_and_close()}),
130o.body.appendChild(this.element_mask)),
131this.options.acceptOnScroll&&e(window,"scroll",
132function(){c.agree_and_close()}),
133o.body.appendChild(this.element),
134this.inserted=!0
135}
136
137},
138
139
140
141a&&(e[n]||(e[n]=new c))}(window);

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.