Advertisement
Guest User

Untitled

a guest
May 28th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Original Styling
  3. // @version 0.1
  4. // @description Original Styling
  5. // @author Alpha_Male, Manocheese, Time
  6. // @match http://www.gamefaqs.com/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function addGlobalStyle(css) {
  11. var head, style;
  12. head = document.getElementsByTagName('head')[0];
  13. if (!head) { return; }
  14. style = document.createElement('style');
  15. style.type = 'text/css';
  16. style.innerHTML = css;
  17. head.appendChild(style);
  18. }
  19.  
  20. addGlobalStyle('.msg_deleted {font-size: 0 !important; }');
  21. addGlobalStyle('.msg_deleted:after {font-size: 11px !important; content: "(who posted?)" !important;}');
  22. 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;}');
  23. addGlobalStyle('.msg_below {position: absolute !important; bottom: 1% !important; right: 0% !important;}');
  24. addGlobalStyle('.msg_body{margin: 0 !important; padding: 8px !important; vertical-align: top !important; float: right !important; min-height: 83px !important; width: 86% !important;}');
  25. addGlobalStyle('.tinynav {display: none;}');
  26. addGlobalStyle('.board.message:nth-child(odd) .msg_body {background-color: red;}');
  27. addGlobalStyle('.msg {position: relative; display: flex !important; border: 1px solid #999999}');
  28. addGlobalStyle('.msg_infobox .post_time {font-size: 13px !important; margin-left: 0 !important; display: block !important;}');
  29. addGlobalStyle('.message_num {position: absolute !important; bottom: 3% !important; right: 2% !important;}');
  30. addGlobalStyle('.board.message .msg_infobox .user_info {display: block;}');
  31. addGlobalStyle('.msg_infobox .post_time:before {content: "Posted ";');
  32.  
  33. var tinynav = document.getElementsByClassName('tinynav')[0];
  34. var nav = tinynav.getElementsByClassName('crumbs');
  35. var links = nav[0].getElementsByTagName('a');
  36. var href = (links.length === 0 ? null : links[1].getAttribute('href'));
  37. var uls = document.getElementsByClassName('unav');
  38. var times = document.getElementsByClassName('post_time');
  39. for (i = 0; i < uls.length; i++)
  40. {
  41. uls[i].insertAdjacentHTML('afterend', '<li><a href="/boards">Board List</a>' +
  42. (href ? ('<li><a href="' + href + '">Topic List</a></li>') : ''));
  43. }
  44. for (i = 0; i < times.length; i++)
  45. {
  46. times[i].innerHTML = times[i].getAttribute('title');
  47. times[i].removeAttribute('title');
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement