User:Iritscen/vector.js

From OniGalore
< User:Iritscen
Revision as of 14:02, 2 October 2022 by Iritscen (talk | contribs) (testing search-focus code, taken from https://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js)
Jump to navigation Jump to search

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)
  • Microsoft 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.
// Use test JS if we're on a test page
if (mw.config.get('wgPageName') === 'User:Iritscen/TestSpace' || mw.config.get('wgPageName') === 'User:Iritscen/TestSpace2')
{
   mw.loader.load('/w/index.php?title=User:Iritscen/TestSpace.js&action=raw&ctype=text/javascript');
}

// Place us in the Search box if we're on the Main Page so we can immediately start typing
if (mw.config.get('wgIsMainPage'))
{
  $(function()
  {
    $('#searchInput').focus();
  });
}

// This code is disabled but left in place since it is referred to on [[MediaWiki:Common]]
// Add handy links to my sidebar
/*$(function()
{
    ModifySidebar("sep", "navigation", "", "");
    ModifySidebar("add", "navigation", "Slaves of War", "http://wiki.oni2.net/Oni2:Slaves_of_War");
});*/