User Tools

Site Tools


cookie-hinweis-banner

Quelle:Webdesign Nürnberg 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: 2024/07/20 17:40 by 127.0.0.1