User:KokoroSenshi/common.js

From Zelda Wiki, the Zelda encyclopedia
< User:KokoroSenshi
Revision as of 12:55, 28 December 2017 by KokoroSenshi (talk | contribs) (Altered so it works when wikiEditor shows first (before toggling to codeEditor toolbar), hopefully)
Jump to navigation Jump 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.
/* Fix the wrong icons showing in the codeEditor buttons */
$('#wpTextbox1').on('wikiEditor-toolbar-doneInitialSections',function(){
	$("#wikiEditor-section-main .group-codeeditor-main .wikiEditor-toolbar-spritedButton").removeClass("wikiEditor-toolbar-spritedButton");
});
mw.hook('codeEditor.configure').add(function(){
	$("#wikiEditor-section-main .group-codeeditor-format .wikiEditor-toolbar-spritedButton").removeClass("wikiEditor-toolbar-spritedButton");
	$("#wikiEditor-section-main .group-codeeditor-style .wikiEditor-toolbar-spritedButton").removeClass("wikiEditor-toolbar-spritedButton");
});