mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added toast for telling users about cookies, closes #137
This commit is contained in:
@@ -205,6 +205,9 @@ $(document).ready(function (){
|
||||
|
||||
window.socket = socket;
|
||||
|
||||
if(!localStorage["ok_cookie"])
|
||||
Materialize.toast("We're using cookies to enhance your experience! <a class='waves-effect waves-light btn light-green' href='#ok' id='cookieok' style='cursor:pointer;pointer-events:all;'> ok</a>", 10000);
|
||||
|
||||
var pad = 0;
|
||||
document.getElementById("zicon").addEventListener("click", function(){
|
||||
pad+=10;
|
||||
@@ -244,6 +247,13 @@ $(document).ready(function (){
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '#cookieok', function() {
|
||||
$(this).fadeOut(function(){
|
||||
$(this).remove();
|
||||
localStorage["ok_cookie"] = true;
|
||||
});
|
||||
});
|
||||
|
||||
$(".listen-button").click(function(){
|
||||
//console.log($(".room-namer").attr("placeholder"));
|
||||
if($(".room-namer").val() == ""){
|
||||
|
||||
Reference in New Issue
Block a user