Spectrum Tweaks

Editing the styling of the Spectrum website for better aesthetics and legibility

目前為 2017-02-20 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Spectrum Tweaks
// @namespace    https://robertsspaceindustries.com/spectrum/*
// @version      0.1
// @description  Editing the styling of the Spectrum website for better aesthetics and legibility
// @author       Royalkin
// @match        https://robertsspaceindustries.com/spectrum/community/SC/forum/*
// @grant        
// ==/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);
}

//-----------------------------------------------------
// DON'T EDIT THIS IF YOU DON'T KNOW WHAT YOU'RE DOING!
//-----------------------------------------------------

// Changes Background Image and Color
addGlobalStyle('.theme-dark#app { background: #0b111a url("https://robertsspaceindustries.com/rsi/static/images/common/bg-stars-1280.jpg"); !important; ');

//Increases the Spacing between Thread Rows
addGlobalStyle('#page.forum-channel .threads-list .row { padding: 25px 10px 25px 20px; !important; }');

//Increases the Size of Thread Title
addGlobalStyle('#page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject { font-size: 1.0rem; !important; }');

//Increases the spacing between the post text and bottom (quote, etc.) buttons
addGlobalStyle('.forum-thread-item > .content .content-footer { padding-top: 10rem !important; }');

//Increases the spacing between the post author and post text
addGlobalStyle('.forum-thread-item > .content .content-header { padding-bottom: 2rem !important; }');

//Limits the width of the site to 80% of the browser
addGlobalStyle('#app #app-content { margin: auto; width: 80%; !important; }');

//Limits the width of the site header to 80% of the browser
addGlobalStyle('#app-header { margin: auto; width: 80%; !important; }');

//Adds a border to the left side of the sidebar
addGlobalStyle('#sidebar { border-left: 1px solid #405171; !important }');

//Ensures proper location of RSI button (top left corner)
addGlobalStyle('#app #app-header a.logo {left: 10%; !important }');

//Changes thread titles to a brighter color
addGlobalStyle('.theme-dark #page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject { color: #D6E3EB; !important }');