L1lith / Crunchyroll Dark Blue Theme

/**
  The MIT License (MIT)

  Copyright (c) 2014 Jeppe Rune Mortensen

  Permission is hereby granted, free of charge, to any person obtaining a copy of
  this software and associated documentation files (the "Software"), to deal in
  the Software without restriction, including without limitation the rights to
  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  the Software, and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**/
// ==UserScript==
// @id           crunchyroll-dark-blue-theme
// @name         Crunchyroll Dark Blue Theme
// @version      0.2
// @description  A dark blue theme for Crunchyroll
// @author       L1lith
// @include      http*://*.crunchyroll.com/*
// @exclude      http*://store.crunchyroll.com/*
// @grant        none
// @run-at document-start
// @license      MIT
// ==/UserScript==

const rawCSS = (
  `.header-menubar li a:hover, .header-menubar li.state-selected a, .header-menubar .freetrial-note, .welcome-more, *[token="welcome_more"], .byline a, .comment-more, .welcome-news-readmore a, a, #header_profile_button *, #header_profile_dropdown * {
    color: #7dc4f0 !important;
}
body, .template-container, .old-template-body {
    background-color: #171717 !important;
}
body > header {
    background-color: #205390 !important;
}
#logo_beta, .nav-con.current, .nav-con:hover, .rating-widget-large, .rating-widget-static-large {
    filter: hue-rotate(-75deg) brightness(2) !important;
}
.js-banner-slide .overlay-action span, img[src="https://www.crunchyroll.com/i/premium_crown_tiny.png"] {
    filter: hue-rotate(158deg);
}
#header_profile_button .user-notification-badge, #header_profile_dropdown .user-notification-badge {
    color: white !important;
}
.header-searchbox-submit>svg {
    fill: #c2e2f1 !important;
}
.header_search_form {
    border-color: #c2e2f1 !important;
}
.header-search-form:hover .header-searchbox-submit>svg, .header-searchbox:focus~.header-searchbox-submit>svg {
    fill: #93ddff !important;
}
.header-icon {
    fill: #d2d1e6 !important;
}
.header-icon:hover {
    fill: #ffa3e9 !important;
}
#tabs .main-tabs {
    background: #50556e !important;
}
.message-container {
    background: #f5fcff !important;
}
#message_box a, .new-footer {
    color: #2c6f98 !important;
}
#footer, #footer_menu, .showmedia-submenu, .white-wrapper {
    background-color: transparent !important;
}
.collection-carousel-arrow {
    filter: hue-rotate(180deg) !important;
}
.header-menubar li a, .welcome-latest-videos span:not(.ordernum):not(.released) {
    color: #cfd2ea !important;
}
.new-template-body, .old-template-body a.block-link, a.block-link, .short-desc, .series-data {
    color: #eaf5ff !important;
}
img {
    border: none;
}
.portrait-element, #source_home #main_content .landscape-grid li .wrapper, #main_content .landscape-element, #source_manga_showview #main_content .landscape-element, #source_manga_showview #main_content .landscape-grid li .wrapper {
    background: #405f84 !important;
    box-shadow: 0 0 1px #405f84 !important;
}
.episode-progress, .rating-histogram .rating-proportion, .user-notification-badge {
    background: #00b8ff !important;
}
.availability-notes-high {
    background: #545673 !important;
}
.availability-notes-low {
    background: #31577e !important;
}
.resume-play {
    background: #5081cb !important;
}
.content-menu {
    border: none !important;
}
/* Manga */

.season-dropdown {
    background-color: #405f84 !important;
}
.season-dropdown, .welcome-block h1 a, .welcome-title-list h1 a {
    color: white !important;
}
body, .welcome-simulcasts .welcome-simulcasts-collection a, .welcome-forum-category a {
    color: #c3c6d2 !important;
}
.welcome-simulcasts .welcome-simulcasts-episode, .welcome-pulse-title, .welcome-countdown-items a {
    color: #9597a7 !important;
}
.wecome-countdown-details {
    color: #aebdd0 !important;
}
.season-dropdown.open {
    color: #405f84 !important;
    background-color: white !important;
}
#tabs, .main-tabs a.selected, .main-tabs a.selected:hover {
    background: #213863 !important;
}
.main-tabs a {
    color: #eaf5ff !important;
}
.main-tabs a.selected {
    color: white !important;
}`)

const styleElement = document.createElement('style')
styleElement.type = "text/css"
styleElement.innerHTML = rawCSS
document.head.appendChild(styleElement)