MartynMage / Basic UI changes on Imgur

// ==UserScript==
// @name         Basic UI changes on Imgur
// @namespace    Basic UI changes on Imgur
// @version      2.1
// @include      http://imgur.com/*
// @include      https://imgur.com/*
// @exclude      http://imgur.com/adm/*
// @exclude      https://imgur.com/adm/*
// @run-at       document-end
// @grant        Nothing!
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}


addGlobalStyle(`
/* Global stuff */
#right-content, .header, .jobs-divider {
    background-color: #2b2b2b;
    padding: 8px;
}

body{
    background-color: #121211;
    font-family: Arial,sans-serif;
    font-size: 14px;
    color: #ddddd1;
}
#topbar{
   background-color: #2b2b2b;
}
.panel{
    background-color: #2b2b2b;
}

/* TODO: investigate if this breaks something.
input[type="text"], input[type="password"], input[type="email"], textarea{
    background-color: #1c1c1c !important;
}
*/

/* Posts */
  .post-header{
    background-color: rgba(38,38,38,.9);
}
.post-title{
    font-size: 16px;
    font-family: open_sansbold,sans-serif;
    font-weight: bold; /* TODO: 400 in original. Why not bold ? */
    color: #f2f2f2;
}
.post-container, .new-panel, .new-panel-header, .layout-options{
    background-color: #2B2B2B !important;
}
.post-image-description, .post-image-meta, .post-action{
    background-color: #2E2E2E;
}
.post-image{
    background-color: #181817;
}
form.caption-create{
    background-color: #1c1c1c !important;
    border: none;
}

/* Comments */
#comments-container{
    background-color: #2B2B2B;
    max-width: 688px;;
    padding: 20px;
}
.caption.pointer.caption-haschildren{
    background-color: #2B2B2B;
    max-width: 640px;
    padding: 20px;
}
.caption{
   margin-bottom: 5px;
}
#captions .usertext{
   background-color: #181817;
}
/* Remove the strange gradient thing*/
.caption-gradient-wrapper{
    display: none;
}
/* We need this because we removed the gradient */
.bad-captions{
    margin-top: 0;
}
.bad-captions > .link{
    margin: 3px 0 14px 15px;
}
  /* Move the open replies button to the left. */

.comment-reply-count-text{
   display: none;
}
.comment-votes{
    left: -45px;
    opacity: 1;
}

#captions.root-caption-container > .children{
    padding-left:40px;
}

/* Minimize "write comment" area when not focused */
#captions > .caption-create{
    height: auto;
    padding: 0px;
}
#captions > .caption-create textarea{
    height: 25px !important;
}
#captions > .caption-create{
    padding: 5px 0px 3px 10px;
}
#captions > .caption-create textarea:focus + .summary{
    display: block;
}
#captions > .caption-create .summary{
    display: none;
}
#captions > .caption-create .summary:hover{
    display: block;
}

/* Why is this even there ? In case you forget your username ? */
#captions > .caption-create .caption-create-username{
    display: none;
}

.comment-create-reply {
    background: #181817;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #3E3E3E;
}
.comment-create-reply:hover {
    color: inherit;
}

.comment-reply-count, .load-more{
    position: absolute;
    left: -66px;
    top: 19.5px;
}

#captions > .caption-create .summary:hover .reply-header .load-more {
    top: 165px;
}

.reply-header .load-more {
    left: 20px;
    top: 130px;
}
`);