Jump to content

User:Ale jrb/Scripts/igloo.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ale jrb (talk | contribs) at 16:07, 14 March 2010 (test). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* ======================================================== *\
** 			igloo frontend manager - main
** 
** 	The igloo frontend manager handles the client system,
** displaying information to the user, as well as allowing
** the user to interact with the program, as well as 
** handling connection and authentication with the server.
**
**  ======================================================  **
**	igloo anti-vandalism tool for Wikipedia
**		created by Alex Barley [[User:Ale_jrb]]
**		copyright (c) Alex Barley - Some Rights Reserved
**
**	For instructions, see [[User:Ale_jrb/Scripts/igloo]]
**  ======================================================  **
**
**	You may copy, modify and distribute this software as
** desired, providing that all previous contributors retain
** correct attribution.
**
**  ======================================================  **
**			tracker: [[User:Ale_jrb/Scripts/igloo]]
\* ======================================================== */

		function iglooImport( page, remote, id ) {
			if ( ( remote == null ) || ( remote == false ) ) {
				var url = wgScript + '?action=raw&ctype=text/javascript&nocache=true&title=' + encodeURIComponent( page.replace( / /g,'_' ) );
			} else {
				var url = page;
			}
			
			if ( document.getElementById ( id ) != null ) {
				document.getElementById ( id ).parentNode.removeChild ( document.getElementById ( id ) );
			}
			
			var script = document.createElement ( 'script' );
			script.setAttribute ( 'src', url );
			script.setAttribute ( 'type', 'text/javascript' );
			if ( id != null ) script.setAttribute ( 'id', id );
			document.getElementsByTagName ( 'head' )[0].appendChild ( script );
			
			return script;
		}

		if ( typeof iglooUseDev !== 'undefined' ) {
			iglooImport ( 'User:Ale_jrb/Scripts/iglooDevSettings.js' );
			iglooImport ( 'User:Ale_jrb/Scripts/iglooDevInterfaceHook.js' );
		} else {
			iglooImport ( 'User:Ale_jrb/Scripts/iglooSettings.js' );
			iglooImport ( 'User:Ale_jrb/Scripts/iglooInterfaceHook.js' );
		}
		
		iglooImport ( 'User:Ale_jrb/Scripts/Nforcer.js' );
		iglooImport ( 'User:Ale_jrb/Scripts/waLib.js' );
		iglooImport ( 'User:Ale_jrb/Scripts/waLib2.js ');