diff options
Diffstat (limited to 'maldrama.cc/assets/javascript/app.js')
| -rw-r--r-- | maldrama.cc/assets/javascript/app.js | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/maldrama.cc/assets/javascript/app.js b/maldrama.cc/assets/javascript/app.js new file mode 100644 index 0000000..6503739 --- /dev/null +++ b/maldrama.cc/assets/javascript/app.js @@ -0,0 +1,62 @@ +var _app = function () { + this.id = 0; + this.videoElement = null; + this.audioElement = null; + this.musicVolume = 0.12; + this.musicFadeIn = 4000; + this.skippedIntro = false; + this.backgroundToggler = false; + this.shouldIgnoreVideo = false; + this.effects = ["bounce", "flash", "pulse", "rubberBand", "shake", "swing", "tada", "wobble", "jello"]; + this.brandDescription = [ + "grinchy boys", + "11 years old kids team", + "pro roblox players", + "xane ddosers", + "trashtalkers", + "zuhn fanboys", + "hack vs hack noobs", + "paste lords", + "baimware users" + ]; + + this.titleChanger = function (text, delay) { + text = text || + ['s1nical', 's1n', 's1nny', 'sin', 'sinny', '=', 'maldrama.cc', 'Song name: KUSO GVKI - Cinnamon (feat. Apfel) (splash! Mag Premiere)']; + delay = delay || 2000; + + var counter = 0; + + setInterval(function () { + if(counter < text.length) + document.title = text[counter++]; + else + document.title = text[counter = 0]; + }, delay); + } + + this.iconChanger = function (urls, delay) { + if (!urls) + return; + + delay = delay || 2000; + + var counter = 0; + + setInterval(function () { + if(counter < urls.length) { + var link = document.querySelector("link[rel*='icon']") || document.createElement('link'); + link.type = 'image/x-icon'; + link.rel = 'shortcut icon'; + link.href = urls[counter]; + document.getElementsByTagName('head')[0].appendChild(link); + } + else + counter = 0; + + ++counter; + }, delay); + } +}; + +var app = new _app(); |