//I should be able to combine these
//colours are weird in dark mode
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Welcome',
type: 'button',
icon: '//https://upload.wikimedia.org/wikipedia/commons/8/82/NotoSans_-_Raised_Hand_With_Fingers_Splayed_-_1F590.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:' + 'Welcome-newuser|heading=no}} ~~' + '~~',
}
}
}
}
});
});
}
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Vandalism warning level 1',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/8/8a/Eo_circle_grey_number-1.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:' + 'uw-vand1}} ~~' + '~~',
}
}
}
}
});
});
}
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Vandalism warning level 2',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/c7/Eo_circle_yellow_number-2.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:' + 'uw-vand2}} ~~' + '~~',
}
}
}
}
});
});
}
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Vandalism warning level 3',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/c5/Eo_circle_deep-orange_number-3.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:' + 'uw-vand3}} ~~' + '~~',
}
}
}
}
});
});
}
if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) {
mw.hook('wikiEditor.toolbarReady').add(function($textarea) {
$textarea.wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
buttonId: {
label: 'Vandalism warning level 4',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/c/cd/Eo_circle_red_number-4.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{subst:' + 'uw-vand4}} ~~' + '~~',
}
}
}
}
});
});
}