MediaWiki:Wikia.js

/* Advanced coders only! Do not edit this page if you aren't sure what it is! */ //Add a Page button switcher var oldAddPage = document.getElementsByClassName('createpage')[0]; var sfwAddPage = document.createElement("a"); sfwAddPage.innerHTML = 'Add a Page!'; sfwAddPage.className = 'createpage'; sfwAddPage.href = "http://sonicfanon.wikia.com/wiki/New_Page"; oldAddPage.parentNode.appendChild(sfwAddPage); oldAddPage.style.display = "none"; //End Add a Page button switcher

// Monobook Button var sfwMonobookSwitch = document.createElement("a"); sfwMonobookSwitch.className = "wikia-button"; sfwMonobookSwitch.id = "SFWMonobookSwitch"; sfwMonobookSwitch.href = "?useskin=monobook"; sfwMonobookSwitch.innerHTML = "Monobook"; document.getElementsByClassName('header-container')[0].appendChild(sfwMonobookSwitch); // End Monobook Button

// SFWModule1 recentActivityModule = document.getElementsByClassName('WikiaActivityModule')[0]; var sfwModule1 = document.createElement("section"); sfwModule1.className = "module"; sfwModule1.id = "sfwModule1"; sfwModule1.innerHTML = ' '; WikiaRail.insertBefore(sfwModule1,recentActivityModule); $("#sfwModule1Frame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWModule1?action=render"); // End SFWModule1

// SFWModule2 var sfwModule2 = document.createElement("section"); sfwModule2.className = "module"; sfwModule2.id = "sfwModule2"; sfwModule2.innerHTML = ' '; sfwModule2.style.padding = "0"; sfwModule2.style.border = "0"; WikiaRail.insertBefore(sfwModule2,sfwModule1); $("#sfwModule2Frame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWModule2?action=render"); // End SFWModule2

//Skin Switcher function switchSkin { var newSkin = document.createElement('style'); $(newSkin).load('http://sonicfanon.wikia.com/wiki/User:Gamedezyner/Newskin.css?action=raw'); $('html > head').append(newSkin); document.getElementById('WikiHeader').children[0].children[0].children[0].src = "http://images.wikia.com/sonicfanon/images/0/05/SFWLOGO.png" } var skinswitcher = document.getElementById('skinswitcher'); skinswitcher.onclick = switchSkin // End Skin Switcher

// Add Page Button Swapper

/* Disabled until standards are voted in --

if (document.getElementsByClassName('createpage')[1]) {	document.getElementsByClassName('createpage')[1].parentNode.removeChild(document.getElementsByClassName('createpage')[1]); } var createbutton = document.getElementsByClassName('createpage')[0]; var createicon = document.createElement("img"); createicon.src = "http://images.wikia.com/sonicfanon/images/b/b2/Newpage.gif"; var newbutton = document.createElement("a"); newbutton.href = "Sonic_Fanon_Wiki:New_Page"; newbutton.appendChild(createicon); newbutton.innerHTML += " Add a Page"; newbutton.className = "button"; newbutton.style.float = "right"; createbutton.parentNode.replaceChild(newbutton,createbutton);

-- Disabled until standards are voted in */

// End Add Page Button Swapper

// Chat Hacks importScriptPage('User:Monchoman45/ChatHacks.js', 'c'); // End Chat Hacks // Chat Logger importScriptPage('User:Joeytje50/ChatLogger.js', 'runescape'); // End Chat Logger

// Control SFWNewsModule for (i=0; i<25; i++) { $("#sfwNewsModuleFrame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWNewsModule/2?action=render").animate({ opacity: 1 }, 2000).delay(10000).animate({ opacity: 0 }, 2000); $("#sfwNewsModuleFrame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWNewsModule/3?action=render").animate({ opacity: 1 }, 2000).delay(10000).animate({ opacity: 0 }, 2000); $("#sfwNewsModuleFrame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWNewsModule/4?action=render").animate({ opacity: 1 }, 2000).delay(10000).animate({ opacity: 0 }, 2000); $("#sfwNewsModuleFrame").load("http://sonicfanon.wikia.com/wiki/MediaWiki:SFWNewsModule/1?action=render").animate({ opacity: 1 }, 2000).delay(10000).animate({ opacity: 0 }, 2000); } window.setTimeout(function{importScriptPage('MediaWiki:Snowfall.min.jquery.js')},5000); window.setTimeout(function{$(document).snowfall({flakeCount : 500, collection : 'p'})},10000);