Wikipedia:Igloo/gloo.js: Difference between revisions

Content deleted Content added
update github branch, whitespace tweaks, per protected edit request
maintenance: more info Uncaught TypeError: Cannot read property 'childNodes' of undefined on Monobook skin
 
(10 intermediate revisions by 3 users not shown)
Line 1:
//<syntaxhighlight lang="javascript">
/* ======================================================== *\
** igloo frontend manager - main
Line 4 ⟶ 5:
** 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.
** (Server interaction not currently present and may not ever
** be present)
**
** ====================================================== **
Line 24 ⟶ 22:
** tracker: [[Wikipedia:Igloo]]
\* ======================================================== */
var window.iglooBranch = iglooBranch || 'master';
 
if ( ['vector'].indexOf( mw.config.get( 'skin' ) ) > -1 ) {
var iglooBranch = iglooBranch || 'master';
mw.loader.load("//tools.wmflabs.org/igloo/code/Igloo/gloo.js");
 
} else {
function iglooImport( page, remote ) {
var c = new Date ();
mw.log.error('Igloo is currently not supported on your skin.');
var cachebypass = '&killcache=' + c.getDate () + c.getSeconds () + c.getMilliseconds ();
if ( ( remote == null ) || ( remote == false ) ) {
var url = wgScript + '?action=raw&ctype=text/javascript' + cachebypass + '&title=' + encodeURIComponent( page.replace( / /g,'_' ) );
} else {
var url = page;
}
var script = document.createElement ( 'script' );
script.setAttribute ( 'src', url );
script.setAttribute ( 'type', 'text/javascript' );
document.getElementsByTagName ( 'head' )[0].appendChild ( script );
return script;
}
//</syntaxhighlight>
 
iglooImport ('https://raw.github.com/Kangaroopower/Igloo/'+iglooBranch+'/lib/flash.js', true);
iglooImport ('https://raw.github.com/Kangaroopower/Igloo/'+iglooBranch+'/lib/jin.js', true);
 
iglooImport ('https://raw.github.com/Kangaroopower/Igloo/'+iglooBranch+'/src/glooInterfaceHook.js', true);