Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/***********************************************************************
EXTRA EDIT BUTTONS
***********************************************************************/
// Extra edit page buttons [[Wikipedia:Tools/Editing_tools#Misc._Editing_tools]]
// This is based on the original code on Wikipedia:Tools/Editing tools
//
// The original code was on the project page and needed to be cut and paste to the user's
// monobook.js page. However, this caused problems with the quote marks. So I have moved
// it to its own page.
//
// I do not know a lot about Javascript so please do not ask for a complicated change
//
// See the [[User:MarkS/Extra edit buttons]] for changes log
function InsertButtonsToToolBar()
{
d = new Date();
todayISO = d.getFullYear()+"-";
if (d.getMonth() > 8) {
todayISO += (d.getMonth()+1)+"-";
} else {
todayISO += "0"+(d.getMonth()+1)+"-";
}
if (d.getDate() > 9) {
todayISO += d.getDate();
} else {
todayISO += "0"+d.getDate();
}
//Strike-Out Button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/c/c9/Button_strike.png",
"speedTip": "Strike",
"tagOpen": "<s>",
"tagClose": "</s>",
"sampleText": "Strike-through text"}
//Table button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Table",
"tagOpen": "\n{| border='1' \n|- \n| 1 || 2\n|- \n| 3 || 4",
"tagClose": "\n|}\n",
"sampleText": ""}
//Line break button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/13/Button_enter.png",
"speedTip": "Line break",
"tagOpen": "<br />",
"tagClose": "",
"sampleText": ""}
//Gallery
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Insert a picture gallery",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:FileName.jpg|Caption1\\Image:FileName2.jpg|Caption2"}
//Category button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/5/5a/Button_category_alt.png",
"speedTip": "Category",
"tagOpen": "[[Category:",
"tagClose": "]]",
"sampleText": "Category title"}
//Reference link button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "<ref>",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Insert reference material"}
//Reference button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/a/a0/Button_references_alt.png",
"speedTip": "Reference footer",
"tagOpen": "==References==\n{{reflist}}",
"tagClose": "",
"sampleText": ""}
//ref+cite web
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/b/b8/Button_Globe.png",
"speedTip": "Reference footer",
"tagOpen": "<ref>{{cite web|url=",
"tagClose": "|title=|publisher=|accessdate="+todayISO+"}}</ref>",
"sampleText": ""}
//redirect
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/en/c/c8/Button_redirect.png",
"speedTip": "Redirect",
"tagOpen": "#REDIRECT [[",
"tagClose": "]]",
"sampleText": ""}
//welcome
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://up.wiki.x.io/wikipedia/commons/8/83/Button_biocitas.png",
"speedTip": "Welcome message",
"tagOpen": "{{sub" + "st:welcomeg}}~~" + "~~",
"tagClose": "",
"sampleText": ""}
}
$( InsertButtonsToToolBar );