Added script for StackOverflow
This commit is contained in:
parent
9bc8dac80c
commit
5bcff39191
|
@ -0,0 +1,51 @@
|
|||
// StackOverflow CSS fixes
|
||||
// version 1.0
|
||||
// 2022-04-26
|
||||
// Copyright (c) 2022 Created by Georgios Sokianos
|
||||
// Released under the GPL license
|
||||
// http://www.gnu.org/copyleft/gpl.html
|
||||
//
|
||||
// ==UserScript==
|
||||
// @name StackOverflow CSS fixes
|
||||
// @namespace none
|
||||
// @description Fixes css in StackOverflow
|
||||
// @include https://stackoverflow.com/*
|
||||
// @version $VER: StackOverflow CSS fixes 1.0 (26.04.2022)
|
||||
// @url https://ko-fi.com/walkero
|
||||
// ==/UserScript==
|
||||
|
||||
|
||||
var css = ' \
|
||||
.s-topbar {z-index: 100; background-color: #eee;} \
|
||||
.s-topbar--container {} \
|
||||
.s-topbar--container > * {display: inline-block;} \
|
||||
.s-topbar--container > ol > li {display: inline-block;} \
|
||||
.s-topbar--container > div.s-popover {display: none;} \
|
||||
h1 {font-size: 1.4rem;} \
|
||||
h1 > a {color: black;} \
|
||||
#left-sidebar {width: 20%; display: inline-block; vertical-align: top;} \
|
||||
#content {width: 78%; display: inline-block;} \
|
||||
#mainbar {width: 76%; vertical-align: top;} \
|
||||
#sidebar {width: 20%; vertical-align: top;} \
|
||||
#footer {background-color: rgb(35, 38, 41); color: white;} \
|
||||
#footer a {font-size: 12px; color: white; padding: 20px 10px;} \
|
||||
.site-footer--logo {width: 10%; display: inline-block; vertical-align: top;} \
|
||||
.site-footer--copyright {width: 26%; display: inline-block; vertical-align: top;} \
|
||||
.site-footer--nav {width: 60%; display: inline-block; vertical-align: top;} \
|
||||
.site-footer--nav > div {width: 20%; display: inline-block; vertical-align: top;} \
|
||||
#mainbar pre {background-color: rgb(246, 246, 246); padding: 5px; overflow: auto;} \
|
||||
';
|
||||
|
||||
var head = document.head || document.getElementsByTagName('head')[0],
|
||||
style = document.createElement('style');
|
||||
|
||||
head.appendChild(style);
|
||||
|
||||
style.type = 'text/css';
|
||||
if (style.styleSheet){
|
||||
// This is required for IE8 and below.
|
||||
style.styleSheet.cssText = css;
|
||||
} else {
|
||||
style.appendChild(document.createTextNode(css));
|
||||
}
|
||||
|
Loading…
Reference in New Issue