Skip to content

Instantly share code, notes, and snippets.

@ReeMii
Created November 5, 2013 18:26
Show Gist options
  • Select an option

  • Save ReeMii/7323663 to your computer and use it in GitHub Desktop.

Select an option

Save ReeMii/7323663 to your computer and use it in GitHub Desktop.
informacje o używaniu cookie przez serwis
cookieInfo = {
show : function() {
cookie = getCookie('cookieInfo');
if(cookie == 'true') {
return;
}
$('body').append('<div id="cookieinfo" style="position:fixed;z-index:1000;top:0;width:100%;background-color:#fcce2f;font-family:Helvetica,Arial,sans-serif;font-weight:300;font-size:12px;color:#000;text-align:center;">'+
'<span style="line-height:45px">Dla Państwa wygody ten serwis używa plików cookies i podobnych technologii po to, by dostosować serwis do potrzeb użytkowników oraz w celach statystycznych.</span>'+
'<button style="display:inline;background:#838383;color:#fff;padding:2px 4px;border:none;cursor:pointer;margin-left:10px;" onclick="cookieInfo.ok()">AKCEPTUJĘ</button>'+
'<span onclick="cookieInfo.close();" style="margin-left:50px;line-height:45px;cursor:pointer">X</span>'+
'</div>');
},
ok : function() {
setCookie('cookieInfo','true',3650);
$('#cookieinfo').remove();
},
close : function() {
$('#cookieinfo').remove();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment