From 280e03f670775c2e41ea8d61be42b618244e1d3f Mon Sep 17 00:00:00 2001 From: edoardoo Date: Tue, 23 Jun 2015 23:55:08 +0200 Subject: [PATCH] fix #6 --- main.js | 7 ++++--- style.css | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/main.js b/main.js index 5a7a4fd..f520b67 100644 --- a/main.js +++ b/main.js @@ -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; diff --git a/style.css b/style.css index d9814c5..caedaf4 100644 --- a/style.css +++ b/style.css @@ -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); + } } \ No newline at end of file