navchandar / SoundCloud Auto Dark Mode

// ==UserScript==
// @name            SoundCloud Auto Dark Mode
// @description     Auto-enables Dark mode on soundcloud.com
// @author          navchandar
// @include         *soundcloud.com/*
// @version         0.2
// @grant           none
// @run-at          document-start
// @copyright       ©2018, navchandar (https://openuserjs.org/users/navchandar)
// @updateURL https://openuserjs.org/meta/navchandar/SoundCloud_Auto_Dark_Mode.meta.js
// @downloadURL https://openuserjs.org/install/navchandar/SoundCloud_Auto_Dark_Mode.user.js
// @license         MIT
// @require         http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @icon            https://a-v2.sndcdn.com/assets/images/sc-icons/favicon-2cadd14b.ico
// @grant           GM_addStyle
// ==/UserScript==

var css = document.createElement('style');
css.type = "text/css";
css.innerHTML = "html { color: #333 !important; }\
.header{width:100%;background:#333;height:46px}\
.header__logo{background:#f50;background:linear-gradient(#f70,#f30)}\
button{ color: lightgrey !important; background-color: #222 !important; }\
body  { color: grey !important; background-color: #333 !important; }\
div   { color: grey !important; background-color: #333 !important; }\
li, li a, ul { color: snow !important; background-color: #333 !important; }\
span{ color: snow !important; }\
input { color: white !important; background-color: #333 !important; }";

var d = new Date(); // for now
var time = d.getHours();
if (time >= 20 || time < 8 ){
    // Run this only @ night
    document.getElementsByTagName('head')[0].appendChild(css);
    document.body.style.background = "#333";
}