MediaWiki:Gadget-script-installer.js: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Content deleted Content added
en>Enterprisey
avoid another loader call
 
m Reverted edits by PB2008 (talk) to last revision by Username
Tags: Replaced Rollback
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-script-installer.js&action=raw&ctype=text/javascript');
/**
* script-installer loader
*/

if( mw.config.get( "wgNamespaceNumber" ) > 0 ) {
var jsPage = mw.config.get( "wgPageName" ).slice( -3 ) === ".js" ||
mw.config.get( "wgPageContentModel" ) === "javascript";
if( jsPage || document.getElementsByClassName( "scriptInstallerLink" ).length ||
document.querySelector( "table.infobox-user-script" ) ) {
mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-script-installer-core.js&action=raw&ctype=text/javascript');
}
}

Latest revision as of 08:13, 3 February 2024

mw.loader.load('https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-script-installer.js&action=raw&ctype=text/javascript');