User:MarkS/extraeditbuttons.js: Difference between revisions

Content deleted Content added
protocol relative url
m Maintenance: Replacing importScriptURI with mw.loader.load (phab:T95964)
 
(8 intermediate revisions by 6 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 32:
if (typeof usersignature == 'undefined') var usersignature = '-- \~\~\~\~';
 
var Isrc='http://upload.wikimedia.org/wikipedia/commons/';
 
// English Wikipedia creates 11 extra buttons which are stored in mwCustomEditButtons
// 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 154 ⟶ 156:
//Remove the buttons the user doesn't want
 
if (typeof rmEditButtons!='object') return;
 
if (typeof rmEditButtons[0] == 'string' && rmEditButtons[0].toLowerCase() == 'all')
Line 219 ⟶ 221:
//extendAButton(Isrc+"6/6a/Button_sup_letter.png",XEBPopupFormattedText)
 
// redirect -##IE doesn't like this line. Object doesn't support this propert<link rel="stylesheet" type="text/css" href="http://en.wikipedia.org/w/index.php?title=User:MarkS/XEB/live.css&action=raw&ctype=text/css&dontcountme=s">yproperty or method
//c=XEBOrder2.getIndex('V');
 
Line 894 ⟶ 896:
function bug(msg)
{
if(mw.config.get('wgUserName')=='MarkS')alert(msg);
}