-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.js
61 lines (50 loc) · 2.37 KB
/
code.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
var script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery-3.6.3.min.js'; // Check https://jquery.com/ for the current version
document.getElementsByTagName('head')[0].appendChild(script);
var randomText1 = [
"<a class='randomText' href='https://en.wikipedia.org/wiki/Lemming#Misconceptions'>Truth about lemmings!!! (link)</a>",
"Robot is chill (*^▽^*)",
"Press WIN + \".\" to use emoji :D",
"I remember names only of three game developers: Hempuli, Hamumu and Hevipelle",
"You didn't restart this page 50 times to read all facts, right?",
"//TODO: Write one more fact",
"Join my discord server if you have any facts suggestions :D",
"Apple is a vegetable, not a fruit",
"One of these facts is a lie ༼ つ ◕_◕ ༽つ",
"Celeste has over 2.2k mods",
"One of the facts has mispell",
"/tableflip (╯°□°)╯︵ ┻━┻",
"/unflip ┬─┬ノ( º _ ºノ)",
"WIN+R is pretty useful (✿◠‿◠)",
"░▒▓ alt+176/7/8 ▓▒░",
"Why are you reading this?",
"In javascript you can use \', \" and \` for strings, but \` is different from \' and \"",
"Hold alt and then type some numbers on numpad",
"The cake is lie",
];
function onLoad() {
const fadeInRows = document.querySelectorAll('.green-text .fade-in-row');
fadeInRows.forEach((element, index) => {
element.style.animationDelay = `${index * 0.25}s`;
element.classList.add('fade-in-row-animated');
});
var currentdate = new Date();
if (document.getElementById('randomText1') != null) {
document.getElementById('randomText1').innerHTML = randomText1[Math.floor(Math.random()*randomText1.length)];
}
if (currentdate.getHours() < 4) {
document.getElementById('randomText1').innerHTML = "It's 4am ╰(‵□′)╯";
}
if (localStorage.getItem("isLightTheme") == "true") {
document.querySelectorAll('*').forEach(function(element) {
element.classList.toggle("light-mode");
});
}
document.querySelector(".green-text").style.visibility = "initial";
}
function toggleTheme() {
document.querySelectorAll('*').forEach(function(element) {
element.classList.toggle("light-mode");
});
localStorage.setItem("isLightTheme",document.body.classList.contains("light-mode"));
}