User:Vigyani/common.js

From Wikipedia, the free encyclopedia
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.
importScript("User:PleaseStand/segregate-refs.js");

importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user

importScript("User:Writ Keeper/Scripts/teahouseTalkbackLink.js"); // Adds a talkback link to signatures on the Teahouse 

importScript("User:Ocaasi/WikiLoveinstallscript.js");// Adds Teahouse Badges to WikiLove

importScript('User:Kephir/gadgets/rater.js'); // [[User:Kephir/gadgets/rater]]

importScript("User:Vigyani/scripts/INBTalkbackLink.js"); // Adds a talkback link to signatures on the INB

importScript('Wikipedia:AutoEd/complete.js');

window.hotcat_del_needs_diff = false;

mw.loader.using("mediawiki.user", function () {
  $('body').delegate('#hotcatCommitForm', 'submit', function () {
    var submitType = this.wpDiff;
    if (submitType && (!this.oldid || this.oldid == '0')) {
      // Switch form submission from diff to save. Don't do this if "oldid" is set to anything but '0':
      // that indicates an edit conflict with yourself, and in that case you really, really do want
      // to see the diff!
      this.wpEditToken.value = mw.user.tokens.get("csrfToken");
      submitType.name = submitType.value = 'wpSave';
    }
    return true;
  });
});

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