Community Central
Community Central

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
//<pre>

function importScriptPage( page, server ) {
	var url = '/index.php?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/javascript';
	if( typeof server == "string" ) {
		if( server.indexOf( '://' ) == -1 ) url = 'http://' + server + '.wikia.com' + url;
		else url = server + url;
	}
	return importScriptURI(url);
}

function importStylesheetPage( page, server ) {
	var url = '/index.php?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/css';
	if( typeof server == "string" ) {
		if( server.indexOf( '://' ) == -1 ) url = 'http://' + server + '.wikia.com' + url;
		else url = server + url;
	}
	return importStylesheetURI(url);
}

//-------------------------//
// START: CSS/JS Includes  //
// STATE: alpha            //
// IE Compatible?          //
//-------------------------//

var include = {
	js: {
		included: {
			url: {},
			wikipage: {}
		},
		// Raw Function: Do not use.
		raw: function( src, text ) {
			var js = document.createElement( 'script' );
			if( js.setAttribute ) {
				js.setAttribute( 'type', 'text/javascript' );
				if( typeof src == "string" ) js.setAttribute( 'src', src );
			} else {
				js.type = 'text/javascript';
				if( typeof src == "string" ) js.src = src;
			}
			if( typeof text == "string" ) {
				var textNode = document.createTextNode( text );
				js.appendChild( textNode );
			}
			document.getElementsByTagName('head')[0].appendChild( js );
		},
		url: function( url ) {
			if( include.js.included.url[url] ) return;
			include.js.included.url[url] = true;
			include.js.raw( url, undefined );
		},
		wikipage: function( pageTitle, server, expandTemplates ) {
			var url = '/index.php?title=' + encodeURIComponent( pageTitle.replace( / /g, '_' ) ) + '&action=raw&ctype=text/javascript';
			if( typeof server == "string" ) {
				if( server.indexOf( '://' ) == -1 ) url = 'http://' + server + '.wikia.com' + url;
				else url = server + url;
			}
			if( expandTemplates != false ) url = url + '&templates=expand';
			include.js.url( url );
		},
		code: function( code ) {
			include.js.raw( undefined, code );
		}
	},
	css: {
		included: {
			url: {},
			wikipage: {}
		},
		// Raw Function: Do not use.
		raw: function( text ) {
			var css = document.createElement( 'style' );
			if( css.setAttribute ) {
				css.setAttribute( 'type', 'text/css' );
			} else {
				css.type = 'text/css';
			}
			if( typeof text == "string" ) {
				var textNode = document.createTextNode( text );
				css.appendChild( textNode );
			}
			document.getElementsByTagName('head')[0].appendChild( css );
		},
		url: function( url ) {
			if( include.css.included.url[url] ) return;
			include.css.included.url[url] = true;
			include.css.raw( '@import "' + url + '";' );
		},
		wikipage: function( pageTitle, server, expandTemplates ) {
			var url = '/index.php?title=' + encodeURI( pageTitle ) + '&action=raw&ctype=text/css';
			if( typeof server == "string" ) {
				if( server.indexOf( '://' ) == -1 ) url = 'http://' + server + '.wikia.com' + url;
				else url = server + url;
			}
			if( expandTemplates != false ) url = url + '&templates=expand';
			include.css.url( url );
		},
		code: function( code ) {
			include.css.raw( code );
		}
	}
};

function queryString(key, dataOnly) {
	var re = RegExp('[&?]'+key+'=([^&]*)');
	var matches;
	matches = re.exec(document.location);
	if( !matches ) matches = re.exec(document.location);
	if( matches ) if( matches.length > 1 ) return decodeURI(matches[1]);
	return ( dataOnly ? '' : null );
};

//</pre>

//<big>'''DO NOT COPY THIS!'''</big>
//'''''This code is hosted off the Wiki-Tools servers, if you wish to enable a syntax highlighting editor, download editarea from sourceforge and host it on your own. You can probably do this off your own computer or even off a POW server if you have Firefox.'''''

//<pre>

/*include.js.url( 'http://skins.wiki-tools.com/libs/editarea/edit_area/edit_area_compressor.php?plugins' );
function initEditArea() {
	var wpTextbox1 = document.getElementById( 'wpTextbox1' );
	if( wpTextbox1 ) {
		editAreaLoader.init({
			id: "wpTextbox1",
			min_width: 250,
			min_height: 100,
			syntax: "wikitext",
			start_highlight: true,
			allow_resize: "both",
			allow_toggle: true,
			plugins: "syntax_selection, charmap, importtext",
			toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font, |, change_smooth_selection, highlight, reset_highlight, |, charmap, |, syntax_selection, |, importtext, |, help",
			syntax_selection_allow: "wikitext,html,xml,js,css,php,python",
			charmap_default: "arrows",
			yui_build_dir: "http://skins.wiki-tools.com/libs/yui/build"
		});
	}
}*/

//</pre>

var ACGinitialized;
var mwNamespaces;
var mwGroups;
if( !ACGinitialized ) {
	var cancelAnime = true;
	if( !mwNamespaces ) var overrideNamespaces = 'User:Dantman/namespaces.js';
	if( !mwGroups ) var overrideGroups = 'User:Dantman/groups.js';
	//include.js.wikipage( 'MediaWiki:Anime-Common.js', 'anime' );
/*Wii note: Please replace spaces with tabs.*/
    //include.css.wikipage( 'MediaWiki:Tabs.css', 'anime' );       include.css.wikipage( 'MediaWiki:Searchswitch.css', 'anime' );
/*End Wii note*/
}
include.js.wikipage( 'User:Dantman/global.config.js', 'www' );

//include.js.url( 'http://localhost:6670/SSwap.js' );
//include.js.url( 'http://localhost:6670/treeview.js' );

if ( skin === "oasis" || skin === "wikia" ) {
    importStylesheetPage("User:Dantman/global.css", "community");
    jQuery(function($) {
        $('<a class="wikia-button secondary" data-id="wikiactivity" title="Special:RecentChanges" href="/wiki/Special:RecentChanges"><img width="0" height="0" src="'+wgBlankImgUrl+'"/> Recent Changes</a>').insertAfter("#WikiHeader .buttons .wikia-button[data-id=wikiactivity]").before(' ');
    });
}