Full Width Spectrum Tweaks

Readability Teaks for Spectrum

  1. /**
  2. The MIT License (MIT)
  3.  
  4. Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. this software and associated documentation files (the "Software"), to deal in
  6. the Software without restriction, including without limitation the rights to
  7. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  8. the Software, and to permit persons to whom the Software is furnished to do so,
  9. subject to the following conditions:
  10.  
  11. The above copyright notice and this permission notice shall be included in all
  12. copies or substantial portions of the Software.
  13.  
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  16. FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  17. COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  18. IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  19. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. **/
  21.  
  22. // ==UserScript==
  23. // @name Full Width Spectrum Tweaks
  24. // @icon http://i.imgur.com/9Gjdt3x.jpg
  25. // @version 0.2
  26. // @description Readability Teaks for Spectrum
  27. // @author Royalkin
  28. // @match https://robertsspaceindustries.com/spectrum/*
  29. // @match https://www.robertspaceindustries.com/spectrum/*
  30. // @licent MIT
  31. // @namespace https://robertsspaceindustries.com/spectrum/*
  32. // ==/UserScript==
  33.  
  34. function addGlobalStyle(css) {
  35. var head, style;
  36. head = document.getElementsByTagName('head')[0];
  37. if (!head) { return; }
  38. style = document.createElement('style');
  39. style.type = 'text/css';
  40. style.innerHTML = css;
  41. head.appendChild(style);
  42. }
  43.  
  44. //------------------------------------------------------
  45. //------------------------------------------------------
  46. // DO NOT EDIT THIS IF YOU DON'T KNOW WHAT YOU'RE DOING!
  47. //------------------------------------------------------
  48. //------------------------------------------------------
  49.  
  50. //--------------------------------------
  51. // Modifications for Variable Width / Less than Full Width
  52. //--------------------------------------
  53.  
  54. /*//Changes the body background color
  55. addGlobalStyle('body {background: url("http://i.imgur.com/lMWOozd.jpg") top center; !important; }');
  56.  
  57. //Changes the layout to centered and less than full browser width
  58. addGlobalStyle('#react { margin: auto; width: 75%; !important; }');
  59.  
  60. //Ensures the RSI button (Top Left Corner) remains in place
  61. addGlobalStyle('#app #app-header a.logo { position: relative; top: 0; left: 0; }');
  62.  
  63. //--------------------------------------
  64. // Modifications for Fixed Width
  65. //--------------------------------------
  66.  
  67. //Changes the body background color
  68. addGlobalStyle('body {background: url("http://i.imgur.com/lMWOozd.jpg") top center; !important; }');
  69.  
  70. //Changes the layout to centered and less than full browser width
  71. addGlobalStyle('#react { margin: auto; width: 1280px; !important; }');
  72.  
  73. //Ensures the RSI button (Top Left Corner) remains in place
  74. addGlobalStyle('#app #app-header a.logo { position: relative; top: 0; left: 0; }');**/
  75.  
  76. //--------------------------------------
  77. // Thread List Modifications
  78. //--------------------------------------
  79.  
  80. //Increase the height of thread list rows
  81. addGlobalStyle('#page.forum-channel .threads-list .row { padding: 10px 25px 10px 25px; !important; }');
  82.  
  83. //Adds distance between thread title, thread author, and started by and last post time
  84. addGlobalStyle('#page.forum-channel .threads-list .row .column.subject .subject-content .subject-content-footer { margin-top: 5px; !important; }');
  85. addGlobalStyle('#page.forum-channel .threads-list .row .column.last-activity > .time-created { margin-top: 5px; !important; }');
  86.  
  87. //Decreases font size and changes the thread list column headers to uppercase
  88. addGlobalStyle('#page.forum-channel .threads-list .row.columns-header { font-size: 0.9rem; text-transform: uppercase; !important;}');
  89.  
  90. //Changes the dark theme color for thread list column headers
  91. addGlobalStyle('.theme-dark #page.forum-channel .threads-list .row.columns-header .column {color: #76bae5; !important;}');
  92.  
  93. //Increase the size and weight of thread titles
  94. addGlobalStyle('#page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject { font-size: 1.0rem; font-weight: bold; !important; }');
  95.  
  96. //Changes the dark theme color for thread titles
  97. addGlobalStyle('.theme-dark #page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject { color: #d6e3Eb; !important; }');
  98.  
  99. //Changes the font size of the channel header
  100. addGlobalStyle('#page.forum-channel .channel-header .info .info-header h1.channel-name { font-size: 1.1rem; !important; }');
  101.  
  102. //Adds indiciation of a visited thread (dark theme)
  103. addGlobalStyle('.theme-dark #page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject:visited { color: #646a6d; !important; }');
  104.  
  105. //Adds indiciation of a visited thread (light theme)
  106. addGlobalStyle('#page.forum-channel .threads-list .row .column.subject .subject-content a.thread-subject:visited { color: #a8b1b6; !important; }');
  107.  
  108. //--------------------------------------
  109. // Post Modifications
  110. //--------------------------------------
  111.  
  112. //Increase the distance between the post body and the action buttons
  113. addGlobalStyle('.forum-thread-item.type-forum_thread_reply > .content .content-footer { padding: 100px 0 0 0; !important;}');
  114. addGlobalStyle('.forum-thread-item > .content .content-footer { padding: 100px 0 0 0; !important; }');
  115.  
  116. //Increses the distance from the top of the post window to the username
  117. addGlobalStyle('.forum-thread-item > .content .content-header .left { margin: 22px 0 0 0; !important; }');
  118.  
  119. //Increase the distance from the username to the post body
  120. addGlobalStyle('.forum-thread-item > .content .content-blocks { margin: 35px 0 0 0; !important; }');
  121.  
  122. //Increase the distance from the username to the post subject line
  123. addGlobalStyle('.forum-thread-item .forum-thread-subject { margin: 55px 0 0 0; !important; }');
  124.  
  125. /*//Changes background color of original post
  126. addGlobalStyle('.theme-dark .forum-thread-item { border-radius: 0; background-color: #282828; !important; }');
  127.  
  128. //Changes background color of reply posts
  129. addGlobalStyle('.theme-dark #page.forum-thread .page-content .forum-thread .forum-thread-replies > .forum-thread-item { border-radious: 0; background: none; border: 1px solid #282828; !important; }');
  130. //background-color: #282828;
  131.  
  132. //Adds background to thread
  133. addGlobalStyle('.theme-dark .page-content { background-color: #111111; !important; }');
  134.  
  135. //Changes the color of the username
  136. addGlobalStyle('.theme-dark .forum-thread-item > .content .content-header .left .member-name span.displayname { color: #dbdbdb; !important; }');
  137.  
  138. //Changes the color of the nickname
  139. addGlobalStyle('.theme-dark .forum-thread-item > .content .content-header .left .member-name span.nickname { color: #aaaaaa !important; }');
  140.  
  141. //Increases padding for the original post
  142. addGlobalStyle('#page.forum-thread .page-content .forum-thread > .forum-thread-item.type-forum_thread { padding: 30px; !important }');
  143.  
  144. //Changes color of forum lables
  145. addGlobalStyle('.theme-dark .forum-label { border-radius: 0; border-color: #6a6a6a; !important; }');
  146. addGlobalStyle('.theme-dark .forum-label .forum-label-gutter { border-radius: 0; background-color: #6a6a6a; !important; }');
  147. addGlobalStyle('.theme-dark .forum-label { color: #acacac; }');
  148. addGlobalStyle('.theme-dark .forum-label .icon use { fill: #acacac; }');**/