Difference between revisions of "User:T burnout/common.js"

From Hobowars Wiki
Jump to: navigation, search
m (test)
m (yap)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
var addExtraButtons = function(){
+
/* Extra Buttons */
    mw.toolbar.addButton( {
+
mw.toolbar.addButton({
        imageFile: '//upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png',
+
imageId: 'mw-editbutton-bold',
        speedTip: 'Comment visible only for editors',
+
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a2/SmallcapsButton.png",
        tagOpen: '<!-- ',
+
    "speedTip": "lol",
        tagClose: ' -->',
+
    "tagOpen": "lololololol",
        sampleText: 'Insert comment here',
+
    "tagClose": "lololololol",
        imageId: 'button-comment'
+
    "sampleText": " huh "});
    } );
+
};
+
+
if( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
+
    mw.loader.using( 'user.options', function () {
+
        if ( ! mw.user.options.get( 'usebetatoolbar' ) ) {
+
            mw.loader.using( 'mediawiki.action.edit', function(){
+
                $( addExtraButtons );
+
            } );
+
        }
+
    } );
+
}
+

Latest revision as of 08:20, 23 July 2014

/* Extra Buttons */
mw.toolbar.addButton({
imageId: 'mw-editbutton-bold',
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a2/SmallcapsButton.png",
     "speedTip": "lol",
     "tagOpen": "lololololol",
     "tagClose": "lololololol",
     "sampleText": " huh "});