Difference between revisions of "MediaWiki:Common.js"
From Fab Lab Wiki - by NMÍ Kvikan
(adding portal:labs specific script) |
|||
Line 1: | Line 1: | ||
if ((wgAction === 'view') && (wgPageName === 'Portal:Labs')) { | if ((wgAction === 'view') && (wgPageName === 'Portal:Labs')) { | ||
console.log("on labs page now"); | console.log("on labs page now"); | ||
− | importScript('MediaWiki:Tangle/Portal:Labs.js'); | + | $.getScript("MediaWiki:Tangle/Portal:Labs.js", function(){ |
+ | initmap(); | ||
+ | } | ||
+ | //importScript('MediaWiki:Tangle/Portal:Labs.js'); | ||
} | } | ||
Revision as of 22:10, 11 May 2014
if ((wgAction === 'view') && (wgPageName === 'Portal:Labs')) { console.log("on labs page now"); $.getScript("MediaWiki:Tangle/Portal:Labs.js", function(){ initmap(); } //importScript('MediaWiki:Tangle/Portal:Labs.js'); } $.getScript("//static.getclicky.com/js", function(){ console.log("Script loaded and executed."); // Here you can use anything you defined in the loaded script try{ clicky.init(100733504); }catch(e){}; $( "body" ).append("<p><img alt=\"Clicky\" width=1 height=1 src=\"//in.getclicky.com/100733504ns.gif\" /></p>"); });