From 6c888c42cfeaff68f8880e9ec73c0450c420bdfa Mon Sep 17 00:00:00 2001 From: Ailin Nemui Date: Fri, 10 Jul 2015 00:41:56 +0200 Subject: irssi-import(2) --- assets/js/welcome.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 assets/js/welcome.js (limited to 'assets/js/welcome.js') 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); +}); -- cgit v1.2.3