User:MarkS/extraeditbuttons.js: Difference between revisions

Content deleted Content added
mwEditButtons has been empty for years, it is no longer possible to remove standard buttons. And even years ago when it was possible, it was not a feature, but a bug (internal variable that leaked in global scope).
m Maintenance: Replacing importScriptURI with mw.loader.load (phab:T95964)
 
(2 intermediate revisions by 2 users 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);
}
}
 
Line 894 ⟶ 896:
function bug(msg)
{
if(mw.config.get('wgUserName')=='MarkS')alert(msg);
}