Browse Source

fix #6

master
edoardoo 10 years ago
parent
commit
280e03f670
2 changed files with 15 additions and 11 deletions
  1. +4
    -3
      main.js
  2. +11
    -8
      style.css

+ 4
- 3
main.js View File

@ -68,8 +68,8 @@ function setVideoListener(){
if (previous.length > 0){
id = previous.data("entry-id");
}
cur
currentVideo.permalink = "http://9gag.com/?id=" + id;
if (currentVideo.permalink == undefined){
console.log("Warning: unable to find the permalink for this post")
}
@ -120,9 +120,10 @@ function toggleNight( command ){
}
function isNightTime(){
var nightHour = 19;
var morningHour = 7;
var date = new Date();
var hours = date.getHours();
if( hours >= nightHour )
if( hours >= nightHour || hours <= morningHour)
return true;
else
return false;


+ 11
- 8
style.css View File

@ -5,14 +5,6 @@ header#top-nav a.logo{
-webkit-animation: rotate 15s infinite linear;
border-right: none !important;
}
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
#container.night{
background-color: white;
@ -48,4 +40,15 @@ header#top-nav a.logo{
}
.hidden{
display: none;
}
/* animations */
@-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}

Loading…
Cancel
Save