User:MarkS/extraeditbuttons.js: Difference between revisions

Content deleted Content added
Migration: wg* → mw.config.get('wg*'). Global config variables are deprecated since MW 1.17 and, if $wgLegacyJavaScriptGlobals is false (as in test2wiki:), they can only be accessed through mw.config
m Maintenance: Replacing importScriptURI with mw.loader.load (phab:T95964)
 
(One intermediate revision by one other user not shown)
Line 14:
//XEBOrder - The order in which the buttons are displayed
 
importStylesheetURImw.loader.load( '//en.wikipedia.org/w/index.php?title=User:MarkS/XEB/live.css&action=raw&ctype=text/css', 'text/css' );
 
if(typeof XEBPopups== 'undefined')XEBPopups=true;
Line 37:
// rather than mwEditButtons. However, there is no guarantee it will always be 11
// so we count them here.
var enExtraButtons=typeof mwCustomEditButtons !== 'undefined' && mwCustomEditButtons.length;
 
 
Line 93:
 
 
if(typeof mwCustomEditButtons !== 'undefined') {
addOnloadHook $(initButtons);
if(!mw.config.get('wgIsArticle'))// only if edit
{
 
if(XEBPopups)hookEvent("load", extendButtons);
}
}