User:קיפודנחש/personalEdittools.js

// personal edit toolbox // witten by he:User:קיפודנחש if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) + 1) mw.loader.using('mediawiki.api', function {       function subPageName {                switch (mw.config.get('wgUserLanguage')) {                        case 'he': return 'כלי עריכה';                        case 'en': return 'Edit tools';                }                return 'Edit tools';        }        new mw.Api.get({action: 'parse', page: 'User:' + mw.config.get('wgUserName') + '/' + subPageName})            .done( function(data) { if (data && data.parse && data.parse.text && data.parse.text['*']) $(function {                                       $('#editpage-specialchars')                                        .before( $(' ', {'class': 'mw-charinsert-buttons'}) .css({border: 'solid gray 1px'}) .html(data.parse.text['*']));                                       $('#personal-edittools-' + (mw.config.get('wgCanonicalNamespace') || 'Article')).toggle(true);                                 }); });               });