User:Wydarty/common.js

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
 // Disable Easy Section Syntax
    window.self.proofreadpage_raw_lst = true;
 
    //OCR mistakes, two newlines → br/tab
    mw.loader.load('//pl.wikisource.org/w/index.php?title=User:Draco flavus/test4.js&action=raw&ctype=text/javascript');
    //mw.loader.load('//pl.wikisource.org/w/index.php?title=User:Draco flavus/test5.js&action=raw&ctype=text/javascript');
    //GoogleOCR
    mw.loader.load('//wikisource.org/w/index.php?title=MediaWiki:GoogleOCR.js&action=raw&ctype=text/javascript');
    //Load a copy of keyboardshortcuts
    mw.loader.load('//pl.wikisource.org/w/index.php?title=User:Draco flavus/test2.js&action=raw&ctype=text/javascript');
    //customize shortcuts
    mw.hook('userjs.shortcutsGadget.ready').add(function (shortcutsGadget) {
        shortcutsGadget.removeAll();
        shortcutsGadget.addTextShortcut( 'alt+,', '{{tab}}' );
        shortcutsGadget.addTextShortcut( 'alt+.', '<br>' );
        shortcutsGadget.addTextShortcut( 'alt+m', '—' );
        shortcutsGadget.addTextShortcut( 'alt+t', 'ö' );
        shortcutsGadget.addTextShortcut( 'alt+e', 'é' );
        shortcutsGadget.addTextShortcut( 'alt+u', '{{---|100}}' );
        shortcutsGadget.addTextShortcut( 'alt+o', '</poem>' );
        shortcutsGadget.addTextShortcut( 'alt+i', '<poem>' );
        shortcutsGadget.addTextShortcut( 'alt+p', '<ref></ref>' );
        shortcutsGadget.addTextShortcut( 'alt+', '”' );
        shortcutsGadget.addTextShortcut( 'alt+h', '„' );
        shortcutsGadget.addTextShortcut( 'alt+j', '“' );
        shortcutsGadget.addTextShortcut( 'alt+k', '’' );
        shortcutsGadget.addTextShortcut( 'alt+a', 'à' );
        shortcutsGadget.addTextShortcut( 'alt+f', 'ê' );
        shortcutsGadget.addTextShortcut( 'alt+b', '–' );
        shortcutsGadget.addTextShortcut( 'alt+g', 'ö' );
        shortcutsGadget.addTextShortcut( 'alt+x', '<section begin="X" /><section end="X" />' );
        shortcutsGadget.addTextShortcut( 'alt+s', '{{Korekta||' );
        shortcutsGadget.addTextShortcut( 'alt+d', 'è' );
        shortcutsGadget.addTextShortcut( 'alt+c', '{{f|align=center|' );
    });