Jump to content

User:GoingBatty/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GoingBatty (talk | contribs) at 17:00, 29 December 2013 (fixed typo). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
window.hotcat_use_category_links = true;

// Add Dab Solver launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",
  "//toolserver.org/~dispenser/cgi-bin/dab_solver.py?page="+wgContentLanguage+":"+encodeURIComponent(wgPageName),
  "Dab Solver"
)});

// Add Find link launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",
  "http://edwardbetts.com/find_link/" + wgPageName,
  "Find link"
)});

// Add LanguageTool launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",
  "http://community.languagetool.org/wikiCheck/index?url=" + wgPageName,
  "LanguageTool"
)});

// Add [[WP:Reflinks]] launcher in the toolbox on left
addOnloadHook(function () {
 addPortletLink(
  "p-tb",     // toolbox portlet
  "//toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + wgPageName 
   + "?client=script&citeweb=on&overwrite=simple&limit=10&lang=" + wgContentLanguage,
  "Reflinks"  // link label
)});

importScript('User:Ohconfucius/script/Sources.js');

importScript('User:Ohconfucius/script/MOSNUM dates.js');

// Save multiple HotCat changes
mw.loader.using("mediawiki.user", function () {
  $('body').delegate('#hotcatCommitForm', 'submit', function () {
    var submitType = this.wpDiff;
    if (submitType) {
      // Switch form submission from diff to save
      this.wpEditToken.value = mw.user.tokens.get("editToken");
      submitType.name = submitType.value = 'wpSave';
    }
    return true;
  });
});