CCC CSS

CSS Hack for Cookie Clicker Cheats

当前为 2015-02-07 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/7922/35533/CCC%20CSS.js

  1. // ==UserScript==
  2. // @name CCC CSS
  3. // @namespace http://userscripts.org/users/zackton
  4. // @description CSS Hack for Cookie Clicker Cheats
  5. // @include http://orteil.dashnet.org/cookieclicker/
  6. // @include orteil.dashnet.org/cookieclicker/
  7. // @run-at document-start
  8. // @grant none
  9. // @version 1.4
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. var d = new Date();
  14.  
  15. if (d.getMonth() == 1-1) {
  16.  
  17. // New Years
  18. var css = ".warning,a.option.warning { \n color:#c00; border-color:#c00; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#c00; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  19.  
  20. } else if (d.getMonth() == 2-1) {
  21.  
  22. // Valentines
  23. var css = ".warning,a.option.warning { \n color:#ec4965; border-color:#ec4965; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#ec4965; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  24.  
  25. } else if (d.getMonth() == 3-1) {
  26.  
  27. // St Patrick's Day
  28. var css = ".warning,a.option.warning { \n color:#39ad56; border-color:#39ad56; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#39ad56; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  29.  
  30. } else if (d.getMonth() == 4-1) {
  31.  
  32. // Easter
  33. var css = ".warning,a.option.warning { \n color:#e1dc3d; border-color:#e1dc3d; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#e1dc3d; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  34.  
  35. } else if (d.getMonth() == 7-1) {
  36.  
  37. // 4th of July
  38. var css = ".warning,a.option.warning { \n color:#800000; border-color:#800000; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#800000; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  39.  
  40. } else if (d.getMonth() == 10-1) {
  41.  
  42. // Halloween
  43. var css = ".warning,a.option.warning { \n color:#e58200; border-color:#e58200; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#e58200; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  44.  
  45. } else if (d.getMonth() == 11-1) {
  46.  
  47. // Thanksgiving
  48. var css = ".warning,a.option.warning { \n color:#b26500; border-color:#b26500; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#b26500; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  49.  
  50. } else if (d.getMonth() == 12-1) {
  51.  
  52. // Chistmas
  53. var css = ".warning,a.option.warning { \n color:#057d9c; border-color:#057d9c; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#057d9c; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  54.  
  55. } else {
  56.  
  57. // No special event, just do a general theme
  58. var css = ".warning,a.option.warning { \n color:#424242; border-color:#424242; \n } #game { \n top:64px; \n } #topBar { \n height:64px; \n } .row { \n height:112px; \n } .row .content { \n height:112px; \n } .title,.section { \n color:#424242; text-shadow: 0px 0px 6px #ccc, 0px 0px 1px #ccc; \n }";
  59.  
  60. }
  61.  
  62.  
  63. if (typeof GM_addStyle != "undefined") {
  64. GM_addStyle(css);
  65. } else if (typeof PRO_addStyle != "undefined") {
  66. PRO_addStyle(css);
  67. } else if (typeof addStyle != "undefined") {
  68. addStyle(css);
  69. } else {
  70. var node = document.createElement("style");
  71. node.type = "text/css";
  72. node.appendChild(document.createTextNode(css));
  73. var heads = document.getElementsByTagName("head");
  74. if (heads.length > 0) {
  75. heads[0].appendChild(node);
  76. } else {
  77. // no head yet, stick it whereever
  78. document.documentElement.appendChild(node);
  79. }
  80. }
  81. })();