Advertisement
djackbyron

Easter Skin 222

Mar 25th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.77 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Easter Skin
  3. // @namespace djackbyron/Annie
  4. // @description Changes NB layout
  5. // @include http://naruto-boards.com*
  6. // @include http://www.naruto-boards.com*
  7. // @version 2.02245665849444075569
  8. // ==/UserScript==
  9. GM_addStyle(" \
  10. body { \
  11. width: auto; \
  12. color: #ffffff; \
  13. background-color: #8ea9ff; \
  14. margin: 0px 0px; \
  15. background-image: url(\"http://imgur.com/eU0xpoH.png\"); \ !important \
  16. background-repeat: repeat-y; \
  17. background-position: center; \ !important \
  18. } \
  19. #layout { \
  20. width: 775px; \
  21. color: #000000; \
  22. background-color: #7efca5; \
  23. margin: 10px auto; !important \
  24. } \
  25. #top { \
  26. height: 200px; \
  27. cursor: pointer; \
  28. background-image: url(\"http://i.imgur.com/OaT5Sje.png\") !important \
  29. } \
  30. #topnav { \
  31. clear: left; \
  32. padding: 10px 5px 0px 5px; \
  33. text-align: center; \
  34. background-image: url(\"http://i.imgur.com/WGSIPUd.png\") !important \
  35. } \
  36. #controlpanel_top { \
  37. background-image: url(\"http://i.imgur.com/Qmeyq25.png\"); !important \
  38. } \
  39. #forumactivity_top { \
  40. background-image: url(\"http://i.imgur.com/QDRJXrq.png\"); !important \
  41. } \
  42. #newtopics_top { \
  43. background-image: url(\"http://i.imgur.com/4IiG1JI.png\"); !important \
  44. } \
  45. div.boxleft { \
  46. width: 237px; \
  47. height: 138px; \
  48. margin-bottom: 10px; \
  49. background-image: url(\"http://i.imgur.com/Ex5Fxq2.png\"); !important \
  50. } \
  51. div.boxright { \
  52. width: 9px; \
  53. height: 138px; \
  54. background-image: url(\"http://i.imgur.com/5T9LgjK.png\"); !important \
  55. } \
  56. div.contenttop { \
  57. height: auto; \
  58. padding-top: 4px;\
  59. background-image: url(\"http://i.imgur.com/wNzeDgb.png\"); !important \
  60. } \
  61. table.controlpanel td span { \
  62. background-repeat: repeat-x; !important \
  63. } \
  64. div.contentmiddle { \
  65. background-image: url(\"http://i.imgur.com/4MqKGSB.jpg\"); \
  66. background-color: #fcf57e; \
  67. padding: 5px 10px 10px 10px; !important \
  68. } \
  69. div.contentbottom { \
  70. background-image: none; !important \
  71. } \
  72. div.inlineheader, table.controlpanel td span, div.header { \
  73. background-image: url(\"http://i.imgur.com/wNzeDgb.png\"); !important \
  74. } \
  75. div.header { \
  76. border: none; !important \
  77. background-color: #8ea9ff; \
  78. } \
  79. input.border, textarea.border { \
  80. background-color: #8ea9ff; \
  81. } \
  82. #help { \
  83. color: black; \
  84. background-image: none; \
  85. background-color: #white; !important \
  86. } \
  87. #footer { \
  88. background-image: url(\"http://i.imgur.com/8Sz09Nx.png\"); !important \
  89. } \
  90. a.bbcode_url { \
  91. font: bold 11px Arial,Verdana,Helvetica,sans-serif; !important \
  92. background-color: #8ea9ff; !important \
  93. } \
  94. div.contentmiddle div center div.nothing { \
  95. color: #000000; !important \
  96. } \
  97. table.navigation td a, table.navigation td.curr b { \
  98. width: 20px; !important \
  99. background-color: #8ea9ff; !important \
  100. } \
  101. #replyf input[value=\"Post Reply\"], input[value=\"Post Topic\"], input[value=\"Edit Reply\"], input[value=\"Send Pm\"], input[value=\"Edit Topic\"] { \
  102. font: 12px Verdana,Arial,Helvetica,sans-serif; \
  103. background-color: #8ea9ff; !important \
  104. height: 22px; \
  105. width: 10%; \
  106. left: 50px; !important \
  107. } \
  108. #replyf input[value=\"Empty Reply\"], input[value=\"Reset Fields\"], input[value=\"Reset Form\"] { \
  109. display: none; !important \
  110. } \
  111. ");
  112.  
  113. var z = document.getElementsByTagName('td');
  114. for (var i=0; i<z.length; i++) {
  115. if ((z[i].className == 'post_userinfo') && (z[i].getElementsByTagName('img').length == 1)) {
  116. // removing rank text
  117. var textnodes = z[i].childNodes;
  118. var count=0;
  119. var textnode;
  120. for (var q=0; q<z[i].childNodes.length; q++) {
  121. textnode=textnodes[q].nodeName;
  122. if(textnode == 'BR') { count++; }
  123. if(textnode == 'IMG') {
  124. k = z[i].getElementsByTagName('br')[1];
  125. k.parentNode.removeChild(k);
  126. break;
  127. }
  128. k = textnodes[q];
  129. k.parentNode.removeChild(k);
  130. }
  131. //end of removing
  132.  
  133. var ranktag = new Image(); // width, height
  134. var userrank = z[i].getElementsByTagName('a')[0].className;
  135.  
  136. if(userrank == 'topicuser_member') {
  137. ranktag.src = 'http://i.imgur.com/hdNpjNN.png';
  138. }
  139. else if(userrank == 'topicuser_global moderator') {
  140. ranktag.src = 'http://i.imgur.com/StQs2PJ.png';
  141. }
  142. else if(userrank == 'topicuser_moderator') {
  143. ranktag.src = 'http://i.imgur.com/iN762Gm.png';
  144. }
  145. else if(userrank == 'topicuser_admin') {
  146. ranktag.src = 'http://i.imgur.com/qP8h3iv.png';
  147. }
  148. else if(userrank == 'topicuser_webmaster') {
  149. ranktag.src = 'http://i.imgur.com/nrhVHnM.png';
  150. }
  151.  
  152. var avatar=z[i].getElementsByTagName('br')[1]; //use 2 if text rank is not removed
  153. avatar.parentNode.insertBefore(ranktag,avatar);
  154.  
  155. if(userrank != 'topicuser_member') {
  156. z[i].getElementsByTagName("img")[0].style.padding = '5px 0px 0px';
  157. z[i].getElementsByTagName("img")[1].style.padding = '0px';
  158. }
  159. } else
  160. if (z[i].className=="title_icon") {
  161. var iconimage = z[i].getElementsByTagName("img")[0].src;
  162. if((iconimage=="http://www.naruto-boards.com/images/forum/board_fresh.gif")
  163. ||(iconimage=="http://www.naruto-boards.com/images/forum/board_fresh.gif"))
  164. z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/ooTHRQp.png';
  165. if((iconimage=="http://www.naruto-boards.com/images/forum/board_old.gif")
  166. ||(iconimage=="http://www.naruto-boards.com/images/forum/board_old.gif"))
  167. z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/uhrjxb4.png';
  168. if((iconimage=="http://http://www.naruto-boards.com/images/forum/board_link.gif")
  169. ||(iconimage=="http://www.naruto-boards.com/images/forum/board_link.gif"))
  170. z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/nC4RfAg.png';
  171. } else
  172. if (z[i].className=="icon") {
  173. var iconimage = z[i].getElementsByTagName("img")[0].src;
  174. if((iconimage=="http://www.naruto-boards.com/images/forum/legend_new.gif")
  175. ||(iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif"))
  176. z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/ooTHRQp.png';
  177. if((iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif")
  178. ||(iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif"))
  179. z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/uhrjxb4.png';
  180. }
  181. }
  182.  
  183. // Replace the navigation buttons
  184. var topnav = document.getElementById('topnav');
  185. var navlinks = topnav.getElementsByTagName('a');
  186. for (var i = navlinks.length - 1; i >= 0; i--) {
  187. var navbuttons = navlinks[i].getElementsByTagName('img');
  188. if(navbuttons.length > 0) {
  189. var linktitle = navlinks[i].getAttribute('title');
  190. if(linktitle == 'Homepage') {
  191. navbuttons[0].src = 'http://i.imgur.com/q3l32Uk.png';
  192. }
  193. else if(linktitle == 'Register') {
  194. navbuttons[0].src = 'http://i.imgur.com/AEg5p4l.png';
  195. }
  196. else if(linktitle == 'Forum rules') {
  197. navbuttons[0].src = 'http://i.imgur.com/hkvHgTt.png';
  198. }
  199. else if(linktitle == 'Lost Password') {
  200. navbuttons[0].src = 'http://i.imgur.com/JeV8Bpw.png';
  201. }
  202. else if(linktitle == 'Forum FAQ') {
  203. navbuttons[0].src = 'http://i.imgur.com/9XlAsXh.png';
  204. }
  205. else if(linktitle == 'Sitemap') {
  206. navbuttons[0].src = 'http://i.imgur.com/Y0QfGgI.png';
  207. }
  208. }
  209. }
  210.  
  211. // Replace the 'View Todays Replies/Topics' icons
  212. var boxrightArray = document.getElementsByClassName('bottomlink');
  213. for (var i = boxrightArray.length - 1; i >= 0; i--) {
  214. var topinfoicons = boxrightArray[i].getElementsByTagName('img');
  215. if(topinfoicons.length > 0) {
  216. topinfoicons[0].src = 'http://i.imgur.com/x3BrQ50.png';
  217. }
  218. }
  219.  
  220. // Replace the breadcrumb icons
  221. var breadcrumbs = document.getElementsByClassName('breadcrumb');
  222. for (var i = breadcrumbs.length - 1; i >= 0; i--) {
  223. var breadcrumbicons = breadcrumbs[i].getElementsByTagName('img');
  224. for (var j = breadcrumbicons.length - 1; j >= 0; j--) {
  225. breadcrumbicons[j].src = 'http://imgur.com/RMKcZPw.png';
  226. }
  227. }
  228.  
  229. // Replace the 'New Topic' button
  230. var maxTable = document.getElementsByClassName('max');
  231. for (var i = maxTable.length - 1; i >= 0; i--) {
  232. var maxImages = maxTable[i].getElementsByTagName('img');
  233. for (var j = maxImages.length - 1; j >= 0; j--) {
  234. var imageSrc = maxImages[i].src;
  235. imageSrc = imageSrc.substring(imageSrc.length-19);
  236. if(imageSrc == 'button_newtopic.gif') {
  237. maxImages[i].src = 'http://i.imgur.com/8p9QFKh.png';
  238. }
  239. }
  240. }
  241.  
  242. // Replace the 'Quote, 'PM', 'Edit', 'Delete' and 'Move' buttons
  243. var replyHeader = document.getElementsByClassName('replyheader');
  244. for (var i = replyHeader.length - 1; i >= 0; i--) {
  245. var replyImages = replyHeader[i].getElementsByTagName('img');
  246. for (var j = replyImages.length - 1; j >= 0; j--) {
  247. var imageSrc = replyImages[j].src;
  248. if(imageSrc.substring(imageSrc.length-14) == 'post_quote.gif') {
  249. replyImages[j].src = 'http://i.imgur.com/AVEMdcO.png';
  250. }
  251. else if(imageSrc.substring(imageSrc.length-11) == 'post_pm.gif') {
  252. replyImages[j].src = 'http://i.imgur.com/FpH1RBq.png';
  253. }
  254. else if(imageSrc.substring(imageSrc.length-13) == 'post_edit.gif') {
  255. replyImages[j].src = 'http://i.imgur.com/BNTBg32.png';
  256. }
  257. else if(imageSrc.substring(imageSrc.length-15) == 'post_delete.gif') {
  258. replyImages[j].src = 'http://i.imgur.com/MEJePLF.png';
  259. }
  260. else if(imageSrc.substring(imageSrc.length-14) == 'topic_move.gif') {
  261. replyImages[j].src = 'http://i.imgur.com/iEf4SfY.png';
  262. }
  263. }
  264. }
  265.  
  266. // Replace the buddy delete icon with the one having a transparent background
  267. var bdtd = document.getElementsByTagName("img");
  268. for (var i=0; i<bdtd.length; i++) {
  269. if ((bdtd[i].src=="http://www.naruto-boards.com/images/buddylist/buddy_delete.gif")||(bdtd[i].src=="http://www.naruto-boards.com/images/buddylist/buddy_delete.gif")) {
  270. bdtd[i].src='http://www.naruto-boards.com/images/buddylist/buddy_delete.gif';
  271. }
  272. }
  273.  
  274. // Top banner link to index
  275. if (document.getElementById("top")) {
  276. document.getElementById("top").setAttribute('onclick', 'window.open("http://www.naruto-boards.com","_self")');
  277. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement