User:PrelevatedInsider22581/common.js

From BetaArchive Wiki
< User:PrelevatedInsider22581
Revision as of 05:51, 1 May 2023 by PrelevatedInsider22581 (talk | contribs) (Created page with " mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:VisualEditor.js&action=raw&ctype=text/javascript' ); window.onload = function() { var target = document...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.
  mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:VisualEditor.js&action=raw&ctype=text/javascript' );
  window.onload = function() {
    var target = document.getElementById( 'visualeditor' );
    if ( target ) {
      var ve = new mw.libs.ve.ui.Surface({
        target: target,
        pageName: mw.config.get( 'wgPageName' )
      });
      ve.initialize();
    }
  }