User:Polygnotus/WarnVandalButtons.js

//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: { welcomeButton: { label: 'Welcome', filters: [ 'body.ns-3' ], type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/6/6f/Handshake_icon_BLACK_and_WHITE.svg', action: { type: 'encapsulate', options: { pre: '', }         }        },        vand1Button: { label: 'Vandalism warning level 1', filters: [ 'body.ns-3' ], type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/8/8a/Eo_circle_grey_number-1.svg', action: { type: 'encapsulate', options: { pre: ' ' + '', }         }        },        vand2Button: { label: 'Vandalism warning level 2', filters: [ 'body.ns-3' ], type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/c/c7/Eo_circle_yellow_number-2.svg', action: { type: 'encapsulate', options: { pre: ' ' + '', }         }        },        vand3Button: { label: 'Vandalism warning level 3', filters: [ 'body.ns-3' ], type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/c/c5/Eo_circle_deep-orange_number-3.svg', action: { type: 'encapsulate', options: { pre: ' ' + '', }         }        },        vand4Button: { label: 'Vandalism warning level 4', filters: [ 'body.ns-3' ], type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/c/cd/Eo_circle_red_number-4.svg', action: { type: 'encapsulate', options: { pre: ' ' + '', }         }        }      }    });

}); }