Removed Dickbutt Easteregg
This commit is contained in:
parent
d300e734b3
commit
f598a2b20e
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
|
@ -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('')");
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
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);
|
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue