ShadeRoot CAH

Eye-friendly magic in your browser for Cards Against Humanity;

  1. //
  2. // Written by Glenn Wiking
  3. // Script Version: 1.1.0
  4. // Date of issue: 01/09/15
  5. // Date of resolution: 01/09/15
  6. //
  7. // ==UserScript==
  8. // @name ShadeRoot CAH
  9. // @namespace SRCAH
  10. // @version 1.1.0
  11. // @grant none
  12. // @icon https://i.imgur.com/10kEWi1.png
  13. // @description Eye-friendly magic in your browser for Cards Against Humanity;
  14.  
  15. // @include *pretendyoure.xyz*
  16.  
  17. // ==/UserScript==
  18.  
  19. function ShadeRootCAH(css) {
  20. var head, style;
  21. head = document.getElementsByTagName('head')[0];
  22. if (!head) { return; }
  23. style = document.createElement('style');
  24. style.type = 'text/css';
  25. style.innerHTML = css;
  26. head.appendChild(style);
  27. }
  28.  
  29. ShadeRootCAH(
  30. 'body {background: #1A1919 !important; color: #8F8B86 !important;}'
  31. +
  32. 'span {color: #8F8B86 !important;}'
  33. +
  34. '#nickbox input, #menubar input, #bottom input, textarea, select, .game_black_card_wrapper input, fieldset input {background: rgb(62, 62, 62) none repeat scroll 0% 0% !important; border-radius: 3px !important; border: 1px solid #555 !important; padding: 2px !important; color: #DEDEDE !important;}'
  35. +
  36. '.gamelist_lobby {background-image: linear-gradient(#242424, #1B1B1B 75%, #111) !important;}'
  37. +
  38. '.gamelist_lobby {background: #212121 !important; border: 1px solid #515151;}'
  39. +
  40. '.gamelist_lobby_join, .gamelist_lobby_spectate {border: 1px solid #535353 !important; background: #595959 linear-gradient(#454545, #333) repeat scroll 0% 0% !important; color: #BBB !important;}'
  41. +
  42. '#tabs {background: #1A1919 !important;}'
  43. +
  44. '.ui-widget-header {border: 1px solid #333 !important; background-color: #393939 !important; background: #1C1D1E url("images/ui-bg_highlight-soft_100_deedf7_1x100.png") repeat-x scroll 50% 50%;}'
  45. +
  46. '.ui-tabs .ui-tabs-nav {background: #3B3B3B !important;}'
  47. //+
  48. //'.ui-tabs .ui-tabs-nav .ui-tabs-anchor {background: #232323}'
  49. +
  50. '.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {border: 1px solid #202020 !important;}'
  51. +
  52. '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {border: 1px solid #8C8C8C !important; background: #7E7E7E url("images/ui-bg_glass_50_3baae3_1x400.png") repeat-x scroll 50% 50% !important;}'
  53. +
  54. 'label, dfn, .ui-tabs-panel, .legend {color: #DEDEDE !important;}'
  55. +
  56. 'fieldset {border-color: rgb(57, 55, 55) !important; border: 1px solid #555 !important;}'
  57. +
  58. '.game_options {background: #2F2F2F none repeat scroll 0% 0% !important;}'
  59. +
  60. '.ui-widget-content a {color: #D7D7D7 !important;}'
  61. +
  62. 'input {opacity: .85 !important;}'
  63. +
  64. '.scorecard {background: #0F0F0F none repeat scroll 0% 0% !important; border-bottom: 1px solid #3C3C3C !important;}'
  65. +
  66. '.scorecard:nth-child(2n) {background: #262525 !important;}'
  67. +
  68. '#info_area, .scorecard {border: 1px solid #424242 !important;}'
  69. +
  70. '.card {border: 1px solid #2D2D2D !important;}'
  71. +
  72. '.whitecard, .gamelist_lobby {background-image: linear-gradient(#424242, #424242 75%, #3C3C3C) !important;}'
  73. +
  74. '.card_text {color: #C9C9C9 !important;}'
  75. +
  76. '.watermark {color: #171717 !important;}'
  77. +
  78. '.confirm_card {opacity: .7 !important;}'
  79. +
  80. '.log input {padding: 0px !important;}'
  81. +
  82. '.logo_1 {transform: rotate(-0.226893rad) scale(2.1) !important;}'
  83. +
  84. '.logo_2 {transform: scale(2.1) !important;}'
  85. +
  86. '.logo_3 {transform: rotate(0.226893rad) scale(2.25) !important;}'
  87. +
  88. '.logo_text {left: 68px !important; color: rgba(0,0,0,0) !important; font-size: 0.01em;}'
  89. +
  90. '.logo_text::after {color: #C6C6C6 !important; font-size: 12px; content:"Made by Glenn Wiking";}'
  91. +
  92. '.game_hand_filter {background: rgba(23, 22, 22, 0.77) none repeat scroll 0% 0% !important;}'
  93. +
  94. '.game_hand_filter_text {background: #171515 none repeat scroll 0% 0% !important;}'
  95. +
  96. '.selected {background: #222324 none repeat scroll 0% 0% !important; color: #DDD;}'
  97. +
  98. '#menubar {background: #000 !important;}'
  99. +
  100. '.game_white_cards_binder {border: 3px solid #181818 !important;}'
  101. +
  102. '.ui-state-active, .ui-state-hover, .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {background: #232323; border: 0px solid rgba(0,0,0,0) !important;}'
  103. +
  104. '.ui-tabs .ui-tabs-nav li.ui-tabs-active {background: #000 !important;}'
  105. +
  106. '.game_right_side_cards .selected {animation: selections 1s linear 0s infinite;}'
  107. +
  108. '@keyframes selections {0% {opacity:1;} 10% {opacity:0.3;} 100% {opacity:1;}}'
  109. +
  110. '.whitecard {box-shadow: 0 2px 8px #0C0C0C !important;}'
  111. +
  112. '.blackcard {box-shadow: 0px 2px 16px 6px #0E0E0E !important;}'
  113. +
  114. '.logo, .card_metadata {transition: opacity .25s ease-in-out;}'
  115. +
  116. '.logo:hover, .card_metadata:hover {transition: opacity .25s ease-in-out; opacity: .20 !important;}'
  117. );