MediaWiki:ChatConsole.js

importScriptPage("User:Dragonfree97/Japanese.js","d97"); importScriptPage("User:Dragonfree97/Korean.js","d97");

siteUrl = wgServer.slice(7,-10);

searchBox = ' ';

$("#search-console-button").click(function {consoleSearch});

function consoleSearch { var searchTermPre = $("#search-term-field").val; var searchTermReady = searchTermPre.replace(" ", "+"); var searchWikiPre = $("#search-term-wiki").val; var searchWikiReady = searchWikiPre.replace(" ", "-"); console.log("Searching for "+searchTermReady+" on "+searchWikiReady+"."); if (searchWikiReady=="") { window.open("http://www.wikia.com/wiki/Special:Search?search="+searchTermReady,'_blank'); console.log("Searching for "+searchTermReady+" on Wikia Central."); } else { window.open("http://"+searchWikiReady+".wikia.com/wiki/Special:Search?search="+searchTermReady,'_blank'); console.log("Searching for "+searchTermReady+" on "+searchWikiReady+"."); } }

japaneseBox = '  ';

koreanBox = '  ';

$('body').append(''+searchBox+japaneseBox+koreanBox+' ');

enabledConsole = 0;

function consoleToggle { if(enabledConsole==1) { $( "#console" ).css( "display", "none" ); $('#consoleCSS').remove; enabledConsole = 0; } else if(enabledConsole==0) { $( "#console" ).css( "display", "block" ); $('head').append(''); enabledConsole = 1; } }

$('#Rail').prepend(' Console  ');