User:Nefastu/JS/VersionHistory.js
From Guild Wars 2 Wiki
Jump to navigationJump to search
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)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* <nowiki> */ if (mw.toolbar) { //version history buttons mw.toolbar.addButton({ imageFile: '//upload.wikimedia.org/wikipedia/commons/8/8e/Button_number_1.png', speedTip: 'Version history table header with section header', tagOpen: '== Version history ==\n{{' + 'Version history table header|', tagClose: '}}', sampleText: 'Table color' }); mw.toolbar.addButton({ imageFile: '//upload.wikimedia.org/wikipedia/commons/b/bd/Button_number_2.png', speedTip: 'Version history table row', tagOpen: '\n{{' + 'Version history table row|202', tagClose: '|}}\n* ', sampleText: '0-02-25' }); mw.toolbar.addButton({ imageFile: '//upload.wikimedia.org/wikipedia/commons/8/80/Button_number_3.png', speedTip: 'Version history table row, release row', tagOpen: '\n{{' + 'Version history table row|release|r=y}}\n|}', tagClose: '', sampleText: '' }); mw.toolbar.addButton({ imageFile: '//upload.wikimedia.org/wikipedia/commons/2/26/Button_horloge.png', speedTip: '/history page entry', tagOpen: '\n\n{' + '{' + '{' + '{subst:#switch:{' + '{subst:#ifeq:{' + '{subst:#show:{' + '{subst:BASEPAGENAME}}|?Has context}}|Item|{' + '{subst:#show:{' + '{subst:BASEPAGENAME}}|?Has item type}}|{' + '{subst:#show:{' + '{subst:BASEPAGENAME}}|?Has context}}}}|Rune|Sigil=Upgrade component|Effect=Effect|Trait=Trait|Skill|default=Skill}} infobox/historical\n| date = 202', tagClose: '\n| changes = \n* [' + '[{' + '{subst:BASEPAGENAME}}{' + '{subst:#ifeq:{' + '{subst:BASEPAGENAME}}||{' + '{subst:!}}{' + '{subst:#show:{' + '{subst:BASEPAGENAME}}|?Has canonical name}}}}]]: \n| minor = y\n}}', sampleText: '0-02-25' }); } /* </nowiki> */