User Tools

Site Tools


cookie-hinweis-banner
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


cookie-hinweis-banner [2023/01/17 08:50] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +Quelle:Webdesign Nürnberg
 +[[https://www.mbm-webdesign.de/cookie-hinweis-script/|Externer Link]]
  
 +Javascript:
 +
 +<!-- Cookie Banner Script Start -->
 +
 +<style>
 +
 +#mbmcookie {position: fixed; bottom: 0; left: 0; right: 0; background: #eee; padding: 20px; font-size: 14px; font-family: verdana;}
 +
 +#mbmcookie a.button {cursor: pointer; background: #ccc; padding: 8px 20px; margin-left: 10px; border-radius: 5px; font-weight: bold; float: right;}
 +
 +#mbmcookie a.button:hover {background-color: #aaa;}
 +
 +#mbmcookie p.cookiemessage {display: block; padding: 0; margin: 0;}
 +
 +</style>
 +
 +<div id="mbmcookie">
 +
 +<a onClick="var d = new Date(); d = new Date(d.getTime() +1000*60*60*24*730); document.cookie = 'mbmcookie=1; expires='+ d.toGMTString() + ';'; document.getElementById('mbmcookie').style.display = 'none';" class="button">Akzeptieren</a>
 +
 +<p class="cookiemessage">Diese Website verwendet Cookies. Durch die Nutzung dieser Webseite erkl&auml;ren Sie sich damit einverstanden, dass Cookies gesetzt werden.
 +
 +<a href="">Mehr erfahren</a></p>
 +
 +</div>
 +
 +<script>
 +
 +var r = 0;
 +
 +a = document.cookie;while(a != ''){while(a.substr(0,1) == ' '){a = a.substr(1,a.length);}cn = a.substring(0,a.indexOf('='));if(a.indexOf(';') != -1){cw = a.substring(a.indexOf('=')+1,a.indexOf(';'));}else{cw = a.substr(a.indexOf('=')+1,a.length);}if(cn == 'mbmcookie'){r = cw;}i = a.indexOf(';')+1;if(i == 0){i = a.length}a = a.substring(i,a.length);}if(r == '1') document.getElementById('mbmcookie').style.display = 'none';
 +
 +</script>
cookie-hinweis-banner.txt · Last modified: 2023/01/17 08:50 by 127.0.0.1