Difference between revisions of "MediaWiki:Common.js"

From SCI Wiki
Jump to navigationJump to search
Line 4: Line 4:
  
 
// Comment
 
// Comment
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
+
mw.toolbar.addButton({
 
         imageId: 'mw-customeditbutton-myspecialbutton',
 
         imageId: 'mw-customeditbutton-myspecialbutton',
 
         imageFile: '/buttons/comment.png',
 
         imageFile: '/buttons/comment.png',
Line 14: Line 14:
  
 
// Block Quote
 
// Block Quote
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
+
mw.toolbar.addButton({
 
         imageId: 'blockquote',
 
         imageId: 'blockquote',
 
         imageFile: '/buttons/blockquote.png',
 
         imageFile: '/buttons/blockquote.png',
Line 24: Line 24:
  
 
// Non-breaking space
 
// Non-breaking space
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
+
mw.toolbar.addButton({
 
         imageId: 'nobreak',
 
         imageId: 'nobreak',
 
         imageFile: '/buttons/nobreak.png',
 
         imageFile: '/buttons/nobreak.png',
Line 34: Line 34:
  
 
// Line Break
 
// Line Break
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
+
mw.toolbar.addButton({
 
         imageId: 'mw-customeditbutton-myspecialbutton',
 
         imageId: 'mw-customeditbutton-myspecialbutton',
 
         imageFile: '/buttons/br.png',
 
         imageFile: '/buttons/br.png',
Line 45: Line 45:
  
 
// Table
 
// Table
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
+
mw.toolbar.addButton({
 
         imageId: '',
 
         imageId: '',
 
         imageFile: '/buttons/table.png',
 
         imageFile: '/buttons/table.png',

Revision as of 01:12, 2 September 2013

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


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

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

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

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


// Table
mw.toolbar.addButton({
        imageId: '',
        imageFile: '/buttons/table.png',
        speedTip: "",
        tagOpen: "{| \
|- \
| ",
        tagClose: "|}",
        sampleText: "Insert content here"
});