Commit f598a2b2 authored by fionera's avatar fionera

Removed Dickbutt Easteregg

parent d300e734
......@@ -5,18 +5,3 @@ cheet('↑ ↑ ↓ ↓ ← → ← → b a enter', function () {
cheet('c t d o', function () {
showNotification("CTDO - Easteregg", "Was? Nein! Wieso?", "/img/yellow.png", 4);
});
cheet('d i c k b u t t', function () {
showDickbutt();
});
function showDickbutt() {
$("body").css("background-image","url('img/dickbutt.png')");
window.setTimeout(removeDickbutt,4000);
}
function removeDickbutt() {
$("body").css("background-image","url('')");
}
var data;
var laststate;
window.setInterval(function(){
$.getJSON("/api/simple/v2", function(data){
var html = [];
$.each(data, function(index, value){
if (index == 'state' && value == false && laststate != false) {
laststate = false;
showNotification("CTDO - Status", "Der Chaostreff Dortmund ist nun geschlossen.", "/img/red.png", 4);
}
else if (index == 'state' && value == true && laststate != true) {
laststate = true;
showNotification("CTDO - Status", "Der Chaostreff Dortmund ist nun offen.", "/img/green.png", 4);
}else {
// Nothing
}
});
});
}, 60000);
var Notification = window.Notification || window.mozNotification || window.webkitNotification;
Notification.requestPermission(function (permission) {
// console.log(permission);
});
function showNotification(name, body, icon, timeout) {
var instance = new Notification(
name, {
body: body,
icon: icon
}
);
instance.onclick = function () {
// Something to do
};
instance.onerror = function () {
// Something to do
};
instance.onshow = function () {
setTimeout(function(){
instance.close();
}, timeout * 1000);
};
instance.onclose = function () {
// Something to do
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment