Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Easter Skin
- // @namespace djackbyron/Annie
- // @description Changes NB layout
- // @include http://naruto-boards.com*
- // @include http://www.naruto-boards.com*
- // @version 2.02245665849444075569
- // ==/UserScript==
- GM_addStyle(" \
- body { \
- width: auto; \
- color: #ffffff; \
- background-color: #8ea9ff; \
- margin: 0px 0px; \
- background-image: url(\"http://imgur.com/eU0xpoH.png\"); \ !important \
- background-repeat: repeat-y; \
- background-position: center; \ !important \
- } \
- #layout { \
- width: 775px; \
- color: #000000; \
- background-color: #7efca5; \
- margin: 10px auto; !important \
- } \
- #top { \
- height: 200px; \
- cursor: pointer; \
- background-image: url(\"http://i.imgur.com/OaT5Sje.png\") !important \
- } \
- #topnav { \
- clear: left; \
- padding: 10px 5px 0px 5px; \
- text-align: center; \
- background-image: url(\"http://i.imgur.com/WGSIPUd.png\") !important \
- } \
- #controlpanel_top { \
- background-image: url(\"http://i.imgur.com/Qmeyq25.png\"); !important \
- } \
- #forumactivity_top { \
- background-image: url(\"http://i.imgur.com/QDRJXrq.png\"); !important \
- } \
- #newtopics_top { \
- background-image: url(\"http://i.imgur.com/4IiG1JI.png\"); !important \
- } \
- div.boxleft { \
- width: 237px; \
- height: 138px; \
- margin-bottom: 10px; \
- background-image: url(\"http://i.imgur.com/Ex5Fxq2.png\"); !important \
- } \
- div.boxright { \
- width: 9px; \
- height: 138px; \
- background-image: url(\"http://i.imgur.com/5T9LgjK.png\"); !important \
- } \
- div.contenttop { \
- height: auto; \
- padding-top: 4px;\
- background-image: url(\"http://i.imgur.com/wNzeDgb.png\"); !important \
- } \
- table.controlpanel td span { \
- background-repeat: repeat-x; !important \
- } \
- div.contentmiddle { \
- background-image: url(\"http://i.imgur.com/4MqKGSB.jpg\"); \
- background-color: #fcf57e; \
- padding: 5px 10px 10px 10px; !important \
- } \
- div.contentbottom { \
- background-image: none; !important \
- } \
- div.inlineheader, table.controlpanel td span, div.header { \
- background-image: url(\"http://i.imgur.com/wNzeDgb.png\"); !important \
- } \
- div.header { \
- border: none; !important \
- background-color: #8ea9ff; \
- } \
- input.border, textarea.border { \
- background-color: #8ea9ff; \
- } \
- #help { \
- color: black; \
- background-image: none; \
- background-color: #white; !important \
- } \
- #footer { \
- background-image: url(\"http://i.imgur.com/8Sz09Nx.png\"); !important \
- } \
- a.bbcode_url { \
- font: bold 11px Arial,Verdana,Helvetica,sans-serif; !important \
- background-color: #8ea9ff; !important \
- } \
- div.contentmiddle div center div.nothing { \
- color: #000000; !important \
- } \
- table.navigation td a, table.navigation td.curr b { \
- width: 20px; !important \
- background-color: #8ea9ff; !important \
- } \
- #replyf input[value=\"Post Reply\"], input[value=\"Post Topic\"], input[value=\"Edit Reply\"], input[value=\"Send Pm\"], input[value=\"Edit Topic\"] { \
- font: 12px Verdana,Arial,Helvetica,sans-serif; \
- background-color: #8ea9ff; !important \
- height: 22px; \
- width: 10%; \
- left: 50px; !important \
- } \
- #replyf input[value=\"Empty Reply\"], input[value=\"Reset Fields\"], input[value=\"Reset Form\"] { \
- display: none; !important \
- } \
- ");
- var z = document.getElementsByTagName('td');
- for (var i=0; i<z.length; i++) {
- if ((z[i].className == 'post_userinfo') && (z[i].getElementsByTagName('img').length == 1)) {
- // removing rank text
- var textnodes = z[i].childNodes;
- var count=0;
- var textnode;
- for (var q=0; q<z[i].childNodes.length; q++) {
- textnode=textnodes[q].nodeName;
- if(textnode == 'BR') { count++; }
- if(textnode == 'IMG') {
- k = z[i].getElementsByTagName('br')[1];
- k.parentNode.removeChild(k);
- break;
- }
- k = textnodes[q];
- k.parentNode.removeChild(k);
- }
- //end of removing
- var ranktag = new Image(); // width, height
- var userrank = z[i].getElementsByTagName('a')[0].className;
- if(userrank == 'topicuser_member') {
- ranktag.src = 'http://i.imgur.com/hdNpjNN.png';
- }
- else if(userrank == 'topicuser_global moderator') {
- ranktag.src = 'http://i.imgur.com/StQs2PJ.png';
- }
- else if(userrank == 'topicuser_moderator') {
- ranktag.src = 'http://i.imgur.com/iN762Gm.png';
- }
- else if(userrank == 'topicuser_admin') {
- ranktag.src = 'http://i.imgur.com/qP8h3iv.png';
- }
- else if(userrank == 'topicuser_webmaster') {
- ranktag.src = 'http://i.imgur.com/nrhVHnM.png';
- }
- var avatar=z[i].getElementsByTagName('br')[1]; //use 2 if text rank is not removed
- avatar.parentNode.insertBefore(ranktag,avatar);
- if(userrank != 'topicuser_member') {
- z[i].getElementsByTagName("img")[0].style.padding = '5px 0px 0px';
- z[i].getElementsByTagName("img")[1].style.padding = '0px';
- }
- } else
- if (z[i].className=="title_icon") {
- var iconimage = z[i].getElementsByTagName("img")[0].src;
- if((iconimage=="http://www.naruto-boards.com/images/forum/board_fresh.gif")
- ||(iconimage=="http://www.naruto-boards.com/images/forum/board_fresh.gif"))
- z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/ooTHRQp.png';
- if((iconimage=="http://www.naruto-boards.com/images/forum/board_old.gif")
- ||(iconimage=="http://www.naruto-boards.com/images/forum/board_old.gif"))
- z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/uhrjxb4.png';
- if((iconimage=="http://http://www.naruto-boards.com/images/forum/board_link.gif")
- ||(iconimage=="http://www.naruto-boards.com/images/forum/board_link.gif"))
- z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/nC4RfAg.png';
- } else
- if (z[i].className=="icon") {
- var iconimage = z[i].getElementsByTagName("img")[0].src;
- if((iconimage=="http://www.naruto-boards.com/images/forum/legend_new.gif")
- ||(iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif"))
- z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/ooTHRQp.png';
- if((iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif")
- ||(iconimage=="http://www.naruto-boards.com/images/forum/legend_old.gif"))
- z[i].getElementsByTagName("img")[0].src='http://i.imgur.com/uhrjxb4.png';
- }
- }
- // Replace the navigation buttons
- var topnav = document.getElementById('topnav');
- var navlinks = topnav.getElementsByTagName('a');
- for (var i = navlinks.length - 1; i >= 0; i--) {
- var navbuttons = navlinks[i].getElementsByTagName('img');
- if(navbuttons.length > 0) {
- var linktitle = navlinks[i].getAttribute('title');
- if(linktitle == 'Homepage') {
- navbuttons[0].src = 'http://i.imgur.com/q3l32Uk.png';
- }
- else if(linktitle == 'Register') {
- navbuttons[0].src = 'http://i.imgur.com/AEg5p4l.png';
- }
- else if(linktitle == 'Forum rules') {
- navbuttons[0].src = 'http://i.imgur.com/hkvHgTt.png';
- }
- else if(linktitle == 'Lost Password') {
- navbuttons[0].src = 'http://i.imgur.com/JeV8Bpw.png';
- }
- else if(linktitle == 'Forum FAQ') {
- navbuttons[0].src = 'http://i.imgur.com/9XlAsXh.png';
- }
- else if(linktitle == 'Sitemap') {
- navbuttons[0].src = 'http://i.imgur.com/Y0QfGgI.png';
- }
- }
- }
- // Replace the 'View Todays Replies/Topics' icons
- var boxrightArray = document.getElementsByClassName('bottomlink');
- for (var i = boxrightArray.length - 1; i >= 0; i--) {
- var topinfoicons = boxrightArray[i].getElementsByTagName('img');
- if(topinfoicons.length > 0) {
- topinfoicons[0].src = 'http://i.imgur.com/x3BrQ50.png';
- }
- }
- // Replace the breadcrumb icons
- var breadcrumbs = document.getElementsByClassName('breadcrumb');
- for (var i = breadcrumbs.length - 1; i >= 0; i--) {
- var breadcrumbicons = breadcrumbs[i].getElementsByTagName('img');
- for (var j = breadcrumbicons.length - 1; j >= 0; j--) {
- breadcrumbicons[j].src = 'http://imgur.com/RMKcZPw.png';
- }
- }
- // Replace the 'New Topic' button
- var maxTable = document.getElementsByClassName('max');
- for (var i = maxTable.length - 1; i >= 0; i--) {
- var maxImages = maxTable[i].getElementsByTagName('img');
- for (var j = maxImages.length - 1; j >= 0; j--) {
- var imageSrc = maxImages[i].src;
- imageSrc = imageSrc.substring(imageSrc.length-19);
- if(imageSrc == 'button_newtopic.gif') {
- maxImages[i].src = 'http://i.imgur.com/8p9QFKh.png';
- }
- }
- }
- // Replace the 'Quote, 'PM', 'Edit', 'Delete' and 'Move' buttons
- var replyHeader = document.getElementsByClassName('replyheader');
- for (var i = replyHeader.length - 1; i >= 0; i--) {
- var replyImages = replyHeader[i].getElementsByTagName('img');
- for (var j = replyImages.length - 1; j >= 0; j--) {
- var imageSrc = replyImages[j].src;
- if(imageSrc.substring(imageSrc.length-14) == 'post_quote.gif') {
- replyImages[j].src = 'http://i.imgur.com/AVEMdcO.png';
- }
- else if(imageSrc.substring(imageSrc.length-11) == 'post_pm.gif') {
- replyImages[j].src = 'http://i.imgur.com/FpH1RBq.png';
- }
- else if(imageSrc.substring(imageSrc.length-13) == 'post_edit.gif') {
- replyImages[j].src = 'http://i.imgur.com/BNTBg32.png';
- }
- else if(imageSrc.substring(imageSrc.length-15) == 'post_delete.gif') {
- replyImages[j].src = 'http://i.imgur.com/MEJePLF.png';
- }
- else if(imageSrc.substring(imageSrc.length-14) == 'topic_move.gif') {
- replyImages[j].src = 'http://i.imgur.com/iEf4SfY.png';
- }
- }
- }
- // Replace the buddy delete icon with the one having a transparent background
- var bdtd = document.getElementsByTagName("img");
- for (var i=0; i<bdtd.length; i++) {
- 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")) {
- bdtd[i].src='http://www.naruto-boards.com/images/buddylist/buddy_delete.gif';
- }
- }
- // Top banner link to index
- if (document.getElementById("top")) {
- document.getElementById("top").setAttribute('onclick', 'window.open("http://www.naruto-boards.com","_self")');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement