diff options
author | Ailin Nemui <ailin@linux.localdomain> | 2015-07-10 00:41:56 +0200 |
---|---|---|
committer | Ailin Nemui <ailin@linux.localdomain> | 2015-08-05 23:13:09 +0200 |
commit | 6c888c42cfeaff68f8880e9ec73c0450c420bdfa (patch) | |
tree | c761dd371843b43b93dec55a3603ba99f61f985d /assets/js/welcome.js | |
parent | aeefab4eb333d47d9d0af936e9e3f59cf86815e1 (diff) | |
download | irssi.github.io-6c888c42cfeaff68f8880e9ec73c0450c420bdfa.zip |
irssi-import(2)
Diffstat (limited to 'assets/js/welcome.js')
-rw-r--r-- | assets/js/welcome.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/assets/js/welcome.js b/assets/js/welcome.js new file mode 100644 index 0000000..7a4f849 --- /dev/null +++ b/assets/js/welcome.js @@ -0,0 +1,41 @@ +var deck = [ + "//irssi-import.github.io/themes/sux.png", + "//irssi-import.github.io/themes/swift.png", + "//irssi-import.github.io/themes/syntax.png", + "//irssi-import.github.io/themes/tinylajs.png", + "//irssi-import.github.io/themes/trakhel.png", + "//irssi-import.github.io/themes/trax.png", + "//irssi-import.github.io/themes/xmas.png", + "//irssi-import.github.io/themes/yellowsyntax.png", + "//irssi-import.github.io/themes/ash.png", + "//irssi-import.github.io/themes/c0ders.png", + "//irssi-import.github.io/themes/dark_winter.png", + "//irssi-import.github.io/themes/dot.png", + "//irssi-import.github.io/themes/elf.png", + "//irssi-import.github.io/themes/elho.png", + "//irssi-import.github.io/themes/h3rbz.png", + "//irssi-import.github.io/themes/hagge.png", + "//irssi-import.github.io/themes/laaama-2.png", + "//irssi-import.github.io/themes/lilah.png", + "//irssi-import.github.io/themes/madcow.png", + "//irssi-import.github.io/themes/more_readable.png", + "//irssi-import.github.io/themes/mosdef.png", + "//irssi-import.github.io/themes/murf.png", + "//irssi-import.github.io/themes/n.png", + "//irssi-import.github.io/themes/rain.png", + "//irssi-import.github.io/themes/screwer.png", + "https://cloud.githubusercontent.com/assets/5665186/4387270/d24911ce-43da-11e4-8d59-f3a14c95d790.jpg", + "https://cloud.githubusercontent.com/assets/5665186/4387267/d2401f24-43da-11e4-8753-666ea552580a.png" + ]; +document.addEventListener("DOMContentLoaded", function(event) { + 'use strict'; + var disp = document.getElementsByClassName("welcome-img")[0]; + setInterval(function(){ + var img = new Image(); + var src = deck[Math.floor(Math.random() * deck.length)]; + img.src = src; + img.onload = function() { + disp.style.backgroundImage = "url("+src+")"; + }; + }, 12*1000); +}); |