Added toast for telling users about cookies, closes #137

This commit is contained in:
Kasper Rynning-Tønnesen
2015-12-01 17:02:47 +01:00
parent e7d3488e95
commit af161d0c10
2 changed files with 11 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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() == ""){