This commit is contained in:
Kasper Rynning-Tønnesen
2015-12-02 16:53:31 +01:00
parent af161d0c10
commit e233f9d823
4 changed files with 34 additions and 4 deletions

View File

@@ -8,6 +8,8 @@
3.3 Search 3.3 Search
*/ */
.snow{-webkit-filter:brightness(100%);-moz-filter:brightness(100%);-o-filter:brightness(100%);filter:brightness(100%);width:5px; height:5px; background-color:white;z-index:1000000;pointer-events:none;position:absolute;border:1px solid white;border-radius:100px;}
/* GLOBAL STYLES */ /* GLOBAL STYLES */
#playbar{ #playbar{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -169,10 +169,35 @@ var Nochan = {
Nochan.add_backdrop(list, i+1); Nochan.add_backdrop(list, i+1);
},6000); },6000);
},
start_snowfall: function(){
setTimeout(function(){
var x = Math.floor((Math.random() * window.innerWidth) + 1);
var snow = document.createElement("div");
var parent = document.getElementsByClassName("mega")[0];
snow.className = "snow";
//snow.attr("left", x);
snow.style.left = x+"px";
snow.style.top = "0px";
parent.appendChild(snow);
Nochan.fall_snow(snow);
Nochan.start_snowfall();
}, 1200);
},
fall_snow: function(corn){
corn.style.top = (parseInt(corn.style.top.replace("px", ""))+2)+"px";
if(parseInt(corn.style.top.replace("px", "")) < document.getElementById("mega-background").offsetHeight-5){
setTimeout(function(){
Nochan.fall_snow(corn);
},50);
}else{
corn.remove();
}
} }
} }
@@ -216,6 +241,9 @@ $(document).ready(function (){
window.location.href = 'https://www.youtube.com/v/0IGsNdVoEh0?autoplay=1&showinfo=0&autohide=1'; window.location.href = 'https://www.youtube.com/v/0IGsNdVoEh0?autoplay=1&showinfo=0&autohide=1';
}); });
Nochan.start_snowfall();
/*if(navigator.userAgent.toLowerCase().indexOf("android") > -1){ /*if(navigator.userAgent.toLowerCase().indexOf("android") > -1){
//console.log("android"); //console.log("android");
if(Nochan.getCookie("show_prompt") == ""){ if(Nochan.getCookie("show_prompt") == ""){