Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Original Styling
- // @version 0.1
- // @description Original Styling
- // @author Alpha_Male
- // @match http://www.gamefaqs.com/*
- // @grant none
- // ==/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('.msg_deleted {font-size: 0 !important; }');
- addGlobalStyle('.msg_deleted:after {font-size: 11px !important; content: "(who posted?)" !important;}');
- addGlobalStyle('.msg_infobox {position: relative; !important; border-top: none !important; border-bottom: none !important; align-items: stretch !important; border-right: 1px solid #999999 !important; text-align: center; float: left; background-color: #cdd9e4 !important; padding: 8px !important; width: 14% !important; line-height: 17px !important;}');
- addGlobalStyle('.msg_below {position: absolute !important; bottom: 1% !important; right: 0% !important;}');
- addGlobalStyle('.msg_body{margin: 0 !important; padding: 8px !important; vertical-align: top !important; float: right !important; min-height: 83px !important; width: 86% !important;}');
- addGlobalStyle('.tinynav {display: none;}');
- addGlobalStyle('.board.message:nth-child(odd) .msg_body {background-color: red;}');
- addGlobalStyle('.msg {position: relative; display: flex !important; border: 1px solid #999999}');
- addGlobalStyle('.msg_infobox .post_time {font-size: 13px !important; margin-left: 0 !important; display: block !important;}');
- addGlobalStyle('.message_num {position: absolute !important; bottom: 3% !important; right: 2% !important;}');
- addGlobalStyle('.board.message .msg_infobox .user_info {display: block;}');
- addGlobalStyle('.msg_infobox .post_time:before {content: "Posted ";');
- var tinynav = document.getElementsByClassName('tinynav')[0];
- var nav = tinynav.getElementsByClassName('crumbs');
- var links = nav[0].getElementsByTagName('a');
- var href = (links.length === 0 ? null : links[1].getAttribute('href'));
- var uls = document.getElementsByClassName('unav');
- var times = document.getElementsByClassName('post_time');
- for (i = 0; i < uls.length; i++)
- {
- uls[i].insertAdjacentHTML('afterend', '<li><a href="/boards">Board List</a>' +
- (href ? ('<li><a href="' + href + '">Topic List</a></li>') : ''));
- }
- for (i = 0; i < times.length; i++)
- {
- times[i].innerHTML = times[i].getAttribute('title');
- times[i].removeAttribute('title');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement