Last active
March 5, 2023 02:56
-
-
Save WNP78/7fcda6fcc0adc329c2c46720145f95c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name simpleplanes.com tweaks | |
// @version 0.2 | |
// @include http://simpleplanes.com/* | |
// @include https://simpleplanes.com/* | |
// @include http://www.simpleplanes.com/* | |
// @include https://www.simpleplanes.com/* | |
// @author WNP78 | |
// ==/UserScript== | |
var style = ` | |
/* Aircraft Post Pop-out */ | |
.post-block { transition: all .2s cubic-bezier(.68,-0.55,.27,1.55); } | |
.post-block:hover { transform: scale(1.1,1.1); } | |
/* Basic dark theme */ | |
body { | |
background: linear-gradient( rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8) ), url('/Content/img/patterns/gray_jean.png') !important; | |
color: #dedede; | |
} | |
.body { | |
background: #272727 !important; | |
border-top-color: #272727 !important; | |
} | |
.body header { | |
background: #272727 !important; | |
} | |
a { color: #079ae4; } | |
h1, h2, h3, h4, h5, h6 { | |
color: #cfcfcf !important; | |
} | |
h3, h4, h5 { | |
color: #20b3fc !important; | |
} | |
p { color: #dedede; } | |
code, pre { | |
background-color: #2d2d2d; | |
color: white; | |
border-color: #4a4a4a; | |
margin: 7px 0px; | |
} | |
blockquote { | |
background: rgba(0,0,0,0.2) !important; | |
border-radius: 3px !important; | |
border-left: 5px solid #797979 !important; | |
} | |
/* Dividers */ | |
hr { | |
background-image: -webkit-linear-gradient(left,transparent,rgba(255,255,255,.65),transparent) !important; | |
background-image: linear-gradient(to right,transparent,rgba(255, 255, 255, 0.65),transparent) !important; | |
} | |
/* Controls */ | |
.btn-default { | |
color: white; | |
background: #777; | |
border-color: #777; | |
} | |
.btn-default:hover, .btn-default:focus, .btn-default:active { | |
color: white !important; | |
background: #666 !important; | |
border-color: #666 !important; | |
} | |
.pagination > li > a, .pagination > li > span, .pagination > li > a:hover, .pagination > li > span:hover { | |
background: #232323; | |
border-color: #232323; | |
} | |
.dropdown-menu { | |
background: #4d4d4d; | |
border-color: #4d4d4d; | |
color: white !important; | |
} | |
.dropdown-menu > li > a { | |
background: #4d4d4d !important; | |
border-color: #4d4d4d !important; | |
color: white !important; | |
} | |
.dropdown-menu > li > a:hover { | |
background: #555 !important; | |
border-color: #555 !important; | |
color: white !important; | |
} | |
.modal-content { background-color: #333131 !important; } | |
.label-success { | |
background: #1e9c1e; | |
} | |
.label-default { | |
background: #666; | |
} | |
.form-control[disabled], .form-control[readonly], fieldset[disabled] { | |
background-color: #333 !important; | |
color: #AAA; | |
} | |
input, .form-control { | |
background-color: #666; | |
border-color: #222; | |
color: #FFF; | |
border-width: 1px; | |
padding: 6px 12px; | |
border-radius: 4px; | |
width: 100%; | |
} | |
.tag-item { | |
background: #484848 !important; | |
} | |
.tag-item:hover { | |
background: #686868 !important; | |
} | |
/* SP specific */ | |
div.strikes { | |
background-color: #353535 !important; | |
} | |
h2.strikes-header { | |
color: #ff2626 !important; | |
font-weight: bold; | |
content: none; | |
} | |
body.boxed .body { | |
border-bottom: 5px solid #0c0c0c !important; | |
} | |
.product-thumb-info { | |
background: #1a1a1a !important; | |
border-color: #1a1a1a !important; | |
} | |
.product-thumb-info.unread { | |
background-color: #00334d !important; | |
} | |
.product-thumb-info h4 { | |
color: white; | |
} | |
.forum-list-votes { | |
background: #474747; | |
color: #ffaa3e; | |
} | |
.notification { | |
background: #4d4d4d; | |
border-color: transparent !important; | |
} | |
.notification p { | |
color: white; | |
} | |
.notification:hover { | |
background: #7d7d7d; | |
} | |
.post-body { | |
background: #4d4d4d; | |
border-color: #4d4d4d; | |
} | |
ul.comments .comment-block { | |
background: #3c3c3c; | |
} | |
ul.comments .pinned .comment-block { | |
background-color: #2f3640; | |
} | |
.downloads { | |
color: #c8c8c8; | |
} | |
.user-detail { | |
background: #444; | |
} | |
ul.comments .comment-arrow { | |
border-right-color: #3c3c3c; | |
} | |
ul.comments .pinned .comment-arrow { | |
border-right-color: #2f3640; | |
} | |
.comment .label-primary { | |
background-color: #08c; | |
} | |
.img-thumbnail { | |
background: #3f3f3f; | |
border-color: transparent; | |
} | |
#header nav ul.nav-main ul.dropdown-menu > li > a { border:none; } | |
.shop table.cart td { | |
border-top: 4px solid #2d2d2d; | |
padding: 6px 10px; | |
} | |
.page-top { | |
border-bottom: 5px solid #666 | |
} | |
a.mention-link { | |
background-color: #212121; | |
color: white; | |
border-radius: 5px; | |
padding-left: 3px; | |
padding-right: 3px; | |
padding-top: 2px; | |
padding-bottom: 2px; | |
} | |
.post-body img, .post-body video { | |
max-width: 100%; | |
} | |
.col-md-6 img { | |
max-width: 100%; | |
} | |
.featured-box { | |
background: #444; | |
border-color: #555; | |
color: #DDD; | |
} | |
#new .row { | |
background-color: #272727 !important; | |
} | |
/* Tables */ | |
.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th { | |
background: #363636; | |
} | |
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { | |
border-top: none; | |
} | |
/* Custom Point Tags */ | |
.user-points.dev { transition: all .5s linear; } | |
.user-points.mod { background: linear-gradient(#d2322d, #8f0000) #d2322d; } | |
.user-points.master { background: linear-gradient(#323030,#181818) #333; border-radius: .25em; } | |
.user-points.gold { background: linear-gradient(#ecbf4f, #bf8800) #e4b84b; } | |
.user-points.silver { background: linear-gradient(#8f8f8f, #545454) #797979; } | |
.user-points.bronze { background: linear-gradient(#786113, #59480f) #786113; } | |
.user-points.noob { border: none; background: linear-gradient(white, #d2d2d2) white; } | |
/* Fix usernames in upvote lists */ | |
table.table-striped td:last-child { | |
max-width: 220px; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} | |
`; | |
// Apply CSS | |
var css = document.createElement("style"); | |
css.type = "text/css"; | |
css.innerHTML = style; | |
document.body.appendChild(css); | |
// Add mention links | |
Array.prototype.forEach.call(document.getElementsByTagName("a"), function (a) { if (/\/u\/[^\/]*/.test(a.href) && a.innerText.startsWith("@")) { a.classList.add("mention-link"); } }); | |
// Fix aircraft descriptions | |
var r = document.getElementsByClassName("morecontent"); | |
if (r.length == 1) { | |
var sp = r[0].getElementsByTagName("span")[0]; | |
sp.innerHTML = sp.innerHTML.substr(1); | |
var m = document.getElementsByClassName("more")[0]; | |
m.childNodes[m.childNodes.length - 2].textContent = ""; | |
} | |
// Re-add the mods button | |
var main = document.getElementById("mainMenu"); | |
var li = document.createElement("li"); | |
var a = document.createElement("a"); | |
a.href = "/Mods"; | |
a.innerText = "Mods"; | |
li.appendChild(a); | |
main.children[3].insertAdjacentElement("afterend", li); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment