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