Difference between revisions of "MediaWiki:Common.js"
From SCI Wiki
Jump to navigationJump to search| Line 2: | Line 2: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* 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: '//upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png', | |
| − | + | speedTip: "Comment", | |
| − | + | tagOpen: "<!-- ", | |
| − | + | tagClose: " -->", | |
| − | + | sampleText: "Insert comment here" | |
| − | + | }); | |
| − | + | ||
| − | + | // Line Break | |
| − | + | mw.toolbar.addButton({ // OLD WAY - "classic toolbar" | |
| − | + | imageId: 'mw-customeditbutton-myspecialbutton', | |
| − | + | imageFile: '//upload.wikimedia.org/wikipedia/en/3/34/Button-br.png', | |
| − | + | speedTip: "New Line", | |
| − | + | tagOpen: "", | |
| − | + | tagClose: "<br />", | |
| − | + | sampleText: "Insert comment here" | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
}); | }); | ||
Revision as of 23:46, 1 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: '//upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png',
speedTip: "Comment",
tagOpen: "<!-- ",
tagClose: " -->",
sampleText: "Insert comment here"
});
// Line Break
mw.toolbar.addButton({ // OLD WAY - "classic toolbar"
imageId: 'mw-customeditbutton-myspecialbutton',
imageFile: '//upload.wikimedia.org/wikipedia/en/3/34/Button-br.png',
speedTip: "New Line",
tagOpen: "",
tagClose: "<br />",
sampleText: "Insert comment here"
});