Difference between revisions of "MediaWiki:Common.js"

From SCI Wiki
Jump to navigationJump to search
Line 20: Line 20:
 
         tagOpen: "",
 
         tagOpen: "",
 
         tagClose: "<br />",
 
         tagClose: "<br />",
 +
        sampleText: ""
 +
});
 +
 +
// Block Quote
 +
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
 +
        imageId: 'blockquote',
 +
        imageFile: '/buttons/blockquote.png',
 +
        speedTip: "Blockquote",
 +
        tagOpen: "<blockquote>",
 +
        tagClose: "</blockquote>",
 
         sampleText: "Insert comment here"
 
         sampleText: "Insert comment here"
 +
});
 +
 +
// Non-breaking space
 +
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
 +
        imageId: 'nobreak',
 +
        imageFile: '/buttons/nobreak.png',
 +
        speedTip: "Non-breaking Space",
 +
        tagOpen: "&nbsp;",
 +
        tagClose: "",
 +
        sampleText: ""
 
});
 
});

Revision as of 00:54, 2 September 2013

/* Any JavaScript here will be loaded for all users on every page load. */


// Comment
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
        imageId: 'mw-customeditbutton-myspecialbutton',
        imageFile: '/buttons/comment.png',
        speedTip: "Comment",
        tagOpen: "<!-- ",
        tagClose: " -->",
        sampleText: "Insert comment here"
});

// Line Break
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
        imageId: 'mw-customeditbutton-myspecialbutton',
        imageFile: '/buttons/br.png',
        speedTip: "New Line",
        tagOpen: "",
        tagClose: "<br />",
        sampleText: ""
});

// Block Quote
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
        imageId: 'blockquote',
        imageFile: '/buttons/blockquote.png',
        speedTip: "Blockquote",
        tagOpen: "<blockquote>",
        tagClose: "</blockquote>",
        sampleText: "Insert comment here"
});

// Non-breaking space
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
        imageId: 'nobreak',
        imageFile: '/buttons/nobreak.png',
        speedTip: "Non-breaking Space",
        tagOpen: "&nbsp;",
        tagClose: "",
        sampleText: ""
});