ttyler333 / rarbgCSSFixer

// ==UserScript==
// @name		rarbgCSSFixer
// @namespace	https://openuserjs.org/users/ttyler333
// @homepage    https://openuserjs.org/users/ttyler333
// @description	This script will fix the CSS on Rarbg.
// @updateURL https://openuserjs.org/src/scripts/ttyler333/rarbgCSSFixer.user.js
// @downloadURL	https://openuserjs.org/src/scripts/ttyler333/rarbgCSSFixer.user.js
// @author		ttyler333
// @copyright   2020, ttyler333 (https://openuserjs.org/users/ttyler333)
// @license MIT
// @version		1.1
// @grant		none
// @icon		http://www.rarbg.to/favicon.ico
// @include     http*://*rarbg.to/*
// @include     http*://*rarbg.to/torrent/*
// @include     http*://*rarbg\.*/
// ==/UserScript==

// ==OpenUserJS==
// @author ttyler333
// ==/OpenUserJS==

/*	Changelog
    1.1
     -Added script to OpenUserJS
     -Added description and copyright details.

    1.0
     -Injected old CSS with new image link locations.

*/

/* CODE */

var css;

/*****************************************************************/

if (document.getElementsByClassName('lista3').length > 0){ // check if there are results

	// css formating
	css = 'body{background:#000 url(https://dyncdn.me/static/20/img/bknd_body.jpg) repeat-x 0 0;color:#FFF;font:normal normal 400 8pt normal Tahoma,Verdana,Arial,Arial;}a:link,a:active,a:visited{color:#3860bb;font-weight:700;}a:hover{text-decoration:underline;color:#3860bb;}h1{font-size:12pt;color:#fff;}.black{color:#000;}p{font-size:10pt;} table.lista{} table.comments.lista td.header2{} table.lista2{background:#000 none repeat scroll 0 0;border: 1px solid #a0cff0; border-collapse: collapse;}td.block{font-size:12pt;color:#000;padding:10px 0;margin:0;}td.blocklist{font-size:8pt;font-weight:700;color:#000;padding:2px;margin:1px;background:#fff none repeat scroll 0 0;}td.lista{color:#000;font-size:8pt;}td.listaalt{color:#FFF;font-size:8pt;background:#242B3B none repeat scroll 0 0;}td.lista2{border:1px solid #a0cff0; color:#000;font-size:8pt;}td.title{font-size:8pt;}td.navigation{font-weight:700;font-size:8pt;background:#fafcfe none repeat scroll 0 0;}form{margin-top:0;margin-bottom:0;}.sublink{font-style:italic;font-size:7pt;font-weight:400;}a.index{font-weight:700;}li{list-style-position:inside;}a.anal,a.anal:link,a.anal:active,a.anal:visited{color:#fff; text-decration:underline;} td.header{font-weight:700;color:#fff;padding:7px;margin:0;} table.header2, tr.header2, td.header2{font-weight:700;color:#000;padding:7px;margin:0;background:#7fa2c6; background:rgba(127, 162, 198, 0.8);border-radius: 2px;-moz-border-radius: 2px;-webkit-border-radius: 2px;} table.lista tbody tr td.lista{padding: 2px 3px; border-bottom: 1px solid #E5E5E5;} table.lista tbody tr td a.anal.delete{color:#000;} td.header2 a{color:#000 !important;} .mylabelstyle{color:#353535;font:700 12px Tahoma,sans-serif;display:block; padding:0;}.b1f,.b2f,.b3f,.b4f{font-size:1px;overflow:hidden;display:block;}.b1f{height:1px;background:#FFF;margin:0 5px;}.b2f{height:1px;background:#FFF;margin:0 3px;}.b3f{height:1px;background:#FFF;margin:0 2px;}.b4f{height:2px;background:#FFF;margin:0 1px;}table.lista-rounded{color:#000;background:#fff;border-radius: 3px;-moz-border-radius: 3px;-webkit-border-radius: 3px;padding:20px;}.content-rounded{}.content-rounded div{margin-left:5px;}#overlib{position:absolute;display:none;z-index:10;color:#FFF;padding:5px;background:#000; background:rgba(0, 0, 0, 0.8);border:1px thin #000;border-radius: 3px;-moz-border-radius: 3px;-webkit-border-radius: 3px;}.lista2 tr:hover{background-color:#d0d7e2;}.lista2 tr:hovered{background-color:#d0d7e2;}.lista2 tr{background-color:#FFF;}.icon-error{width:500px;border:solid 1px #CC0000; background:#F7CBCA url(/img/msg/icon-red.png) 8px 6px no-repeat;color:#CC0000;font-weight:bold;padding:4px;text-align:center;}li.bluecircle{list-style: circle outside; color:#5CACEE;}a.dmodes,a.dmodes:link,a.dmodes:active,a.dmodes:visited{color:#3860bb;font-size:9pt;font-weight:bold;font-style:italic;}.roundednew{border-top: 1px #494949 solid;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;background-color:#1c1c1c;padding:5px;}td.header3{height:30px;width:90px;font-weight:700;color:#fff;text-align:center;margin:0;background:#3860bb;-webkit-border-top-left-radius: 3px;-webkit-border-top-right-radius: 3px;-moz-border-radius-topleft: 3px;-moz-border-radius-topright: 3px;border-top-left-radius: 3px;border-top-right-radius: 3px;}.roundednew td.lista{color: #fff;} .roundednew td.lista table td.lista a{font-weight: normal;color: #3860BB; text-decoration: underline;} .roundednew td.lista table td.lista a:hover{color: #fff;}td.header3:hover{background:#555;}td.header4{height:30px;width:200px;font-weight:700;color:#fff;text-align:center;margin:0;background-color:#333;-moz-border-radius: 3px 3px 0px 0px;border-radius: 3px 3px 0px 0px;}table.lista3{background:transparent none repeat scroll 0 0;border-bottom:0 none #000;border-top:0 none #000;border-left:0 none #000;border-right:0 none #000;}input.pftext{background:#3860bb;border: 1px solid #5eabe2;padding:0 25px;text-decoration: none;color:#fff;font-weight:700;height:28px;cursor:pointer;}input.pftext:hover{background-position: 0 100%;border-color: #fff;border-style: solid;border-width: 1px;}input,select{height:28px;line-height:28px;padding:0 5px;background:#fff;border:1px solid #888;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;}a.loginBtn-1{display: block; float: left; font-size: 10px; font-weight: normal; background:#171717; height: 16px; line-height:16px; text-decoration:none; padding: 3px 10px; color:#666; -moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px;}a.loginBtn-1:hover{color:#fff;}a.loginBtn-2{display: block; float:left; background:#717171; color:#000; height: 16px; line-height:16px; text-decoration:none; padding: 3px 10px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px;font-size:10px;font-weight:normal;}a.loginBtn-2:hover{background: #000; color: #fff;}td.header5{height:28px;font-weight:700;color:#fff;text-align:center;margin:0;background:#3860bb;-moz-border-radius-topleft: 3px;-moz-border-radius-bottomleft:3px;-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-left-radius:3px;cursor:pointer;}td.header5:hover{background:#555;}td.header3.selected {background: #fff; color: #000;} td.header3.selected a.anal {text-decoration: none; color: #2e58a4;} select{height: 30px;}.searchTorrent,.formBox,.formBox2{width:620px;padding:15px;background:#d3dde7;border:1px solid #9faabc;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;}.formBox{width:auto;}.formBox2{margin:0 auto;}a.pageLink{background:#567caa !important;*background-color:#567caa;color:#fff;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;}a.pageLink:hover{background:#464646 !important;border:1px solid #ccc;}table.lista2t{border-collapse:collapse;border-bottom:2px solid #a0cff0;border-left:2px solid #a0cff0;}table.lista2t tr.lista2 td{border-right:1px solid #a0cff0;}table.lista2t tr.lista2{background:#e7f3fb;border-bottom:1px solid #fff;}table.lista2t tr.lista2 td{border-bottom:1px solid #fff;}table.lista2t tr.lista2:nth-child(odd){background:#dfeffa;border:1px solid #fff;border-collapse:collapse;}table.lista2t tr.lista2:nth-child(even){background:#e7f3fb;border:1px solid #fff;border-collapse:collapse;}table.lista2t tr.lista2:hover{background:#d3dbe9;background:rgba(40,80,150,.2);}td.header6{border-right:1px solid #a0cff0;font-weight:700;color:#fff;text-align:center;margin:0;background:#3860bb;cursor:pointer;}td.header6:hover{background:#555;}input.pftextSearch{background:url(https://dyncdn.me/static/20/img/bknd_searchbutton.jpg) no-repeat 0 -1px;padding:0 10px 0 23px;height:30px;color:#fff;cursor:pointer;font-weight:700;}input.pftextSearch:hover{border:1px solid #fff;}a.socialLogin{display:block;width:30px;height:30px;background:url(https://dyncdn.me/static/20/img/social_button.png) no-repeat 0 0;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;}a.socialLogin:hover{opacity:.6;}input.pftext.cancel{background:url(https://dyncdn.me/static/20/img/bknd_button_cancel.jpg) repeat-x 0 0;border:1px solid #e25e5e;}td.lista a.rating,td.lista a.eff,td.lista a.fav,td.lista a.edit,td.lista a.mail{display:block;width:50px;height:36px;opacity:0.6;text-decoration:none !important;color:#fff !important;position:relative;}td.lista a.rating:hover,td.lista a.eff:hover,td.lista a.fav:hover,td.lista a.edit:hover,td.lista a.mail:hover{opacity:1;}td.lista a.rating{background:url(https://dyncdn.me/static/20/img/i_rating.png) no-repeat 50% 0;}td.lista a.eff{background:url(https://dyncdn.me/static/20/img/i_ranking.png) no-repeat 50% 0;}td.lista a.fav{background:url(https://dyncdn.me/static/20/img/i_favourites.png) no-repeat 50% 0;}td.lista a.edit{background:url(https://dyncdn.me/static/20/img/i_edit.png) no-repeat 50% 0;}td.lista a.mail{background:url(https://dyncdn.me/static/20/img/i_mailbox.png) no-repeat 50% 0;}td.lista a.rating big,td.lista a.eff big,td.lista a.fav big,td.lista a.edit big,td.lista a.mail big{display:none;}.numbers{display:block;position:absolute;bottom:3px;left:0;font-size:9px;background:#222;background:rgba(0,0,0,.5);width:50px;width:48px;border:1px solid #aaa;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;}.newMail{display:block;position:absolute;top:-3px;top:0;right:2px;font-size:9px;background:red;text-align:center;padding:1px 4px;border:2px solid #fff;border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;}ul.catalog{overflow:hidden;list-style-type:none;}ul.catalog li{float:left;margin:0 5px;}.next_prev{position:relative;height:30px;}.next_prev{position:relative;height:30px;}.next_prev .next_button{display:block;position:absolute;top:0;left:50%;width:80px;height:30px;line-height:30px;margin:0;background:url(https://dyncdn.me/static/20/img/bknd_button.jpg) repeat-x 0 0;-webkit-border-top-right-radius:5px;-webkit-border-bottom-right-radius:5px;-moz-border-radius-topright:5px;-moz-border-radius-bottomright:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-left:thin solid #FFF;}.next_prev .next_button:hover{background:url(https://dyncdn.me/static/20/img/bknd_button.jpg) repeat-x 0 100%;}.next_prev .prev_button{display:block;position:absolute;top:0;left:50%;width:80px;margin:0 0 0 -80px;height:30px;line-height:30px;background:url(https://dyncdn.me/static/20/img/bknd_button.jpg) repeat-x 0 0;-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;border-top-left-radius:5px;border-bottom-left-radius:5px;border-right:thin solid #FFF;}.next_prev .prev_button:hover{background:url(https://dyncdn.me/static/20/img/bknd_button.jpg) repeat-x 0 100%;}.next_prev .next_button a{color:#FFF;}.next_prev .prev_button a{color:#FFF;}#pager_links {padding-top: 5px;padding-bottom: 5px;margin-top: 5px;margin-bottom: 5px;margin-left: auto;margin-right: auto;}#pager_links b {border: 1px solid #DDDDDD;background-color: #f5f5f5;color: #999999;cursor: default;display:inline-block;*display: inline;margin: 0 5px 0 0;padding: 2px 8px;text-align: center;text-decoration: none;font-weight: 700;line-height: 20px;}#pager_links a {border: 1px solid #DDDDDD;color: #3860bb;display: inline-block;*display: inline;margin: 0 5px 0 0;padding: 2px 8px;text-align: center;text-decoration: none;font-weight: 700;line-height: 20px;}#pager_links a:hover {background-color: #f5f5f5;}input:-moz-placeholder,textarea:-moz-placeholder {color: #999999;}input:-ms-input-placeholder,textarea:-ms-input-placeholder {color: #999999;}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder {color: #999999;}select {font-size: 14px;font-weight: normal;line-height: 20px;display: inline-block;padding: 4px 6px;font-size: 14px;line-height: 20px;color: #555555;vertical-align: middle;}.btn {display: inline-block;*display: inline;*zoom: 1;padding: 4px 12px;margin-bottom: 0;font-size: 14px;line-height: 20px;*line-height: 20px;text-align: center;vertical-align: middle;cursor: pointer;color: #333333;background-color: #f5f5f5;border-color: #e6e6e6 #e6e6e6 #bfbfbf;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color: #e6e6e6;border: 1px solid #bbbbbb;*border: 0;border-bottom-color: #a2a2a2;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;*margin-left: .3em;}.btn {border-color: #c5c5c5;border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled] {color: #333333;background-color: #e6e6e6;*background-color: #d9d9d9;}.btn:hover {color: #333333;text-decoration: none;background-color: #e6e6e6;*background-color: #d9d9d9;}.btn-primary {color: #ffffff;background-color: #3860bb;border-color: #3860bb #3860bb #002a80;border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color: #3860bb;}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled] {color: #ffffff;background-color: #555;*background-color: #555;}.btn-primary:active,.btn-primary.active {background-color: #003399 \9;}[class^="icon-"],[class*=" icon-"] {display: inline-block;width: 14px;height: 14px;*margin-right: .3em;line-height: 14px;vertical-align: text-top;background-image: url("https://dyncdn.me/static/20/img/glyphicons-halflings-white.png");background-position: 14px 14px;background-repeat: no-repeat;margin-top: 1px;}.icon-search {background-position: -48px 0;}.icon-th{background-position: -240px 0;}.icon-list{background-position: -360px -48px;}.btn-small {padding: 2px 10px;font-size: 11.9px;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}.btn-small [class^="icon-"],.btn-small [class*=" icon-"] {margin-top: 0;}.btn-mini {padding: 1px 6px;font-size: 10.5px;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px;}button.btn.btn-small,input[type="submit"].btn.btn-small {*padding-top: 3px;*padding-bottom: 3px;}button.btn,input[type="submit"].btn {*padding-top: 3px;*padding-bottom: 3px;}button.btn.btn-mini,input[type="submit"].btn.btn-mini {*padding-top: 1px;*padding-bottom: 1px;}.icon-remove{background-position: -312px 0;}.icon-arrow-left {background-position: -240px -96px;}.icon-download{background-position: -120px -24px;}.icon-home {background-position: 0 -24px;}.icon-inbox {background-position: -168px -24px;}.icon-comment {background-position: -240px -120px;}.icon-user {background-position: -168px 0;}.icon-lock {background-position: -287px -24px;}.icon-arrow-down {background-position: -312px -96px;}.icon-arrow-up {background-position: -289px -96px;}.torrent_social {font-size: 1px;}.torrent_social iframe {vertical-align: middle;}.torrent_social span {display: inline-block;width: 110px;}.torrent_social .google {width: 75px;}.btn-mini {padding: 1px 6px;font-size: 10.5px;-webkit-border-radius: 2px;-moz-border-radius: 2px;border-radius: 2px;}button.btn.btn-mini,input[type="submit"].btn.btn-mini {*padding-top: 1px;*padding-bottom: 1px;}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"] {margin-top: -1px;}a.tdlinkfull1,a.tdlinkfull1:link,a.tdlinkfull1:active,a.tdlinkfull1:visited{display: block; height: 21px; padding-top: 6px;}a.tdlinkfull2,a.tdlinkfull2:link,a.tdlinkfull2:active,a.tdlinkfull2:visited{display: block; height: 20px; padding-top: 6px;}td.header40{padding:0px;}a.tdlinkfull3,a.tdlinkfull3:link,a.tdlinkfull3:active,a.tdlinkfull3:visited{display: block; height: 21px; padding-top: 6px;}.divadvscat {width:148px;height:25px;float:left;align:left;text-align:left;vertical-align:middle;}.inputadvscat {vertical-align:top;padding:0px;margin:0px;height:auto;}.divadvclearcats {color:#111;text-decoration:none;text-align:center !important;display:block !important;}.divadvclearcats:hover {text-decoration: underline;}:focus{outline: none;}';

	// apply css
	var style = document.createElement('style');
	if (style.styleSheet){
		style.styleSheet.cssText = css;
    }else{
		style.appendChild(document.createTextNode(css));
	document.getElementsByTagName('head')[0].appendChild(style);
    }
}

var els = document.getElementsByTagName("*");
for(var i = 0, l = els.length; i < l; i++) {
var el = els[i];
// ==Menu_left_dropdown==
el.innerHTML = el.innerHTML.replace(/dyncdn2.com/gi, 'dyncdn.me');
}