Advertisement
Guest User

Untitled

a guest
Mar 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        ZEN-Ifier
  3. // @namespace   kak-test
  4. // @description WELP
  5. // @include     http://board.kafuka.org/*
  6. // @version     2
  7. // @grant       none
  8. // ==/UserScript==
  9.  
  10.  
  11. //window.addEventListener('load', function() {
  12.  
  13.   // Disable the current CSS
  14.   var defs = document.getElementsByTagName("link");
  15.   var gotcha = 0;
  16.   for (var i = 0; i < defs.length; i++) {
  17.     //console.log("(" + i + ") | " + defs[i].getAttribute("href") + "<br>");
  18.     if (defs[i].getAttribute("href").substr(0, 3) == "css") {
  19.       if (gotcha == 0) {
  20.         gotcha = 1;
  21.         continue;
  22.       }
  23.       // Found the CSS declaration
  24.       // alert("Got it at " + i + " !");
  25.       defs[i].disabled= true;
  26.       break;
  27.     }
  28.   }
  29.  
  30.   // :V :V :V (simulates Jul header and removes attn box)
  31.   defs = document.getElementsByTagName("img");
  32.   for (var i = 0; i < defs.length; i++) {
  33.     if (defs[i].getAttribute("src").substr(0, 5) == "theme") {
  34.       defs[i].src = "http://jul.rustedlogic.net/images/zen/zentitle.png";
  35.       //               IMG .A         .TD        .OTHER TD (ATTNBOX)
  36.       var attnbox = defs[i].parentNode.parentNode.nextElementSibling;
  37.       attnbox.parentNode.removeChild(attnbox); // RIP
  38.       break;
  39.     }
  40.   }
  41.  
  42.   // Place the new one
  43.   addHeadTag("style", "" +
  44. "a { color: #BEFEBA; } " +
  45. "a:visited { color: #99c090; } " +
  46. "a:active { color: #CFFFBE; } " +
  47. "a:hover { color: #CEFECA; } " +
  48. " " +
  49. "a:link, a:visited, a:active, a:hover { " +
  50. " text-decoration: none; " +
  51. " font-weight: bold; " +
  52. "} " +
  53. " " +
  54. "body { " +
  55. " color: #DDDDDD; " +
  56. " font-family: Verdana, 'geneva', sans-serif; " +
  57. " font-size: 13px;" +
  58. " background: #010; " +
  59. " font-size: 1em; " +
  60. "} " +
  61. " " +
  62. ".c1,.c2 { " +
  63. " width: 100%; " +
  64. " border-collapse: collapse; " +
  65. " empty-cells: show; width: 100%; " +
  66. " border-top: #001100 1px solid; " +
  67. " border-left: #001100 1px solid; " +
  68. " border-spacing: 0px; " +
  69. "} " +
  70. //".b { border: 1px solid #875857;} " +
  71. ".n1,.c1 { background: #005028; } " +
  72. ".n2,.c2 { background: #104830; } " +
  73. ".h { " +
  74. " background: #007c00 url('http://jul.rustedlogic.net/images/zen/header.png') repeat-x top center; " +
  75. " text-shadow: 1px 1px 2px #000; " +
  76. " color: #AAFFCC !important; " +
  77. "} " +
  78. ".c { background:#005020 url('http://jul.rustedlogic.net/images/zen/t1.png') repeat-x top center; } " +
  79. ".h,.c { " +
  80. " text-align: center; " +
  81. "} " +
  82. "td.h, td.c, td.n1, td.n2, .b { " +
  83. " border-right: #001100 1px solid !important; " +
  84. " border-bottom: #001100 1px solid !important; " +
  85. "} " +
  86. "textarea,input,select{ " +
  87. " border: #000000 solid 1px; " +
  88. " background:#000000; " +
  89. " color: #DDDDDD; " +
  90. " font: 10pt verdana;} " +
  91. "textarea:focus { " +
  92. " border: #000000 solid 1px; " +
  93. " background:#000000; " +
  94. " color: #DDDDDD; " +
  95. " font: 10pt verdana;} " +
  96. "input[type=radio]{ " +
  97. " border: none; " +
  98. " background:none; " +
  99. " color: #DDDDDD; " +
  100. " font: 10pt verdana;} " +
  101. "input[type=submit]{ " +
  102. " border: #000000 solid 2px; " +
  103. " font: 10pt verdana;} " +
  104. " " +
  105. ".sfont { " +
  106. " font-size: 0.8em; " +
  107. " font-family: verdana; " +
  108. "} " +
  109. " " +
  110. ".nc0x{color:#888888} .nc1x{color:#888888} .nc2x{color:#888888} " +
  111. ".nc00{color:#97ACEF} .nc10{color:#F185C9} .nc20{color:#7C60B0} " +
  112. ".nc01{color:#D8E8FE} .nc11{color:#FFB3F3} .nc21{color:#EEB9BA} " +
  113. ".nc02{color:#AFFABE} .nc12{color:#C762F2} .nc22{color:#47B53C} " +
  114. ".nc03{color:#FFEA95} .nc13{color:#C53A9E} .nc23{color:#F0C413}"
  115.   );
  116.  
  117. //}, false);
  118.  
  119.  
  120. function addHeadTag(tag, contents) {
  121.  
  122.   var e = document.createElement(tag);
  123.   var t = document.createTextNode(contents);
  124.   e.appendChild(t);
  125.   document.head.appendChild(e);
  126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement