User:Aemony/common.js
From PCGamingWiki, the wiki about fixing PC games
Note: After saving, 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)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
console.log("User:Aemony/common.js executing..."); console.log("-- Link: https://pcgamingwiki.com/wiki/User:Aemony/common.js"); // Check if we're editing a page. if (['edit', 'submit'].indexOf(mw.config.get('wgAction')) !== -1) { // Add a hook handler. mw.hook('wikiEditor.toolbarReady').add(function($textarea) { // Adds custom byttons to the advanced > insert group $textarea.wikiEditor('addToToolbar', { 'section': 'advanced', 'group': 'insert', 'tools': { 'fixbox': { label: 'Fixbox', type: 'button', icon: '//images.pcgamingwiki.com/d/d8/Editor_Icon_-_Fixbox.svg', action: { type: 'encapsulate', options: { pre: "{{Fixbox|description=", peri: "Name", post: "|ref=<ref>Reference</ref>|fix=\n}}", ownline: true } } } } }); }); }