MediaWiki:Common.js: Difference between revisions
From MCS
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: mwCustomEditButtons.push({ "imageFile": "images/Button_enter.png", "speedTip": "Li...") |
No edit summary |
||
Line 28: | Line 28: | ||
"imageFile": "images/Button_gallery.png", | "imageFile": "images/Button_gallery.png", | ||
"speedTip": "Insert a picture gallery", | "speedTip": "Insert a picture gallery", | ||
"tagOpen": "\n<gallery widths= | "tagOpen": "\n<gallery widths=200px heights=320px perrow=3>\n", | ||
"tagClose": "\n</gallery>", | "tagClose": "\n</gallery>", | ||
"sampleText": "Image: | "sampleText": "Image:MCS_Example1.png|''Caption1''\nImage:MCS_Example2.png|''Caption2''" | ||
}); | }); | ||
Line 39: | Line 39: | ||
var stndrdth = ["th","st","nd","rd","th","th","th","th","th","th"]; | var stndrdth = ["th","st","nd","rd","th","th","th","th","th","th"]; | ||
var dayth = today.getDate() % 10; | var dayth = today.getDate() % 10; | ||
mwCustomEditButtons.push({ | mwCustomEditButtons.push({ |
Revision as of 11:39, 25 August 2017
/* Any JavaScript here will be loaded for all users on every page load. */
mwCustomEditButtons.push({
"imageFile": "images/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""
});
mwCustomEditButtons.push({
"imageFile": "images/Button_upper_letter.png",
"speedTip": "Superscript",
"tagOpen": "<sup>",
"tagClose": "</sup>",
"sampleText": "Superscript text"
});
mwCustomEditButtons.push({
"imageFile": "images/Button_small.png",
"speedTip": "Small",
"tagOpen": "<small>",
"tagClose": "</small>",
"sampleText": "Small Text"
});
mwCustomEditButtons.push({
"imageFile": "images/Button_gallery.png",
"speedTip": "Insert a picture gallery",
"tagOpen": "\n<gallery widths=200px heights=320px perrow=3>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:MCS_Example1.png|''Caption1''\nImage:MCS_Example2.png|''Caption2''"
});
var today = new Date();
var monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
var stndrdth = ["th","st","nd","rd","th","th","th","th","th","th"];
var dayth = today.getDate() % 10;
mwCustomEditButtons.push({
"imageFile": "images/Button_insert_table.png",
"speedTip": "Insert a table",
"tagOpen": '{| class="wikitable" border="1"\n|- bgcolor="silver"\n',
"tagClose": "\n|}\n",
"sampleText": "! header1 !! header2 !! header3\n|-\n| cell1 || cell2 || cell3"
});
mwCustomEditButtons.push({
"imageFile": "images/Button_comment.png",
"speedTip": "Insert a comment",
"tagOpen": '{{comment|text=',
"tagClose": "\n|sign=[[User:"+wgUserName+"]]|date="+today.getDate()+"/"+(today.getMonth()+1)+"/"+today.getFullYear()+" "+today.getHours()+":"+today.getMinutes()+":"+today.getSeconds()+"}}\n",
"sampleText": "Your Comment Here"
});