-
Notifications
You must be signed in to change notification settings - Fork 0
/
yt.js
35 lines (28 loc) · 987 Bytes
/
yt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function hideOther() {
document.getElementById("masthead-positioner").style.visibility = "hidden";
document.getElementById("watch7-main-container").style.visibility = "hidden";
}
function showOther() {
document.getElementById("masthead-positioner").style.visibility = "visible";
document.getElementById("watch7-main-container").style.visibility = "visible";
}
function setBackgroundColour() {
document.body.style.background = "#000";
//document.body.style.backgroundColor = "black";
}
function unsetBackgroundColour() {
document.body.style.background = "#FFF";
}
distracted = localStorage.getItem("distracted");
console.log("distracted = " + distracted);
if (distracted == "true") {
console.log("Time to turn things off...");
hideOther();
setBackgroundColour();
localStorage["distracted"] = false;
} else {
console.log("Bringing the noise...");
showOther();
unsetBackgroundColour();
localStorage["distracted"] = true;
}