MediaWiki:Gadget-HotCat.js/local defaults: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Content deleted Content added
Amos (talk | contribs)
mNo edit summary
 
Amos (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:
HotCat.use_up_down = false;
HotCat.use_up_down = false;
HotCat.upload_disabled = true;
HotCat.upload_disabled = true;
HotCat.disambig_category = 'Disambiguation categories';
HotCat.messages.using = '';
HotCat.messages.using = '.';


// Blacklisted categories cannot be added through HotCat.
//Blacklisted categories cannot be added through HotCat.
HotCat.blacklist = /\b[Ss]tubs?$|^[Ss]tubs?\b|\b[Dd]isambiguation pages$|^[Rr]edirect(?:s|ed)?\b/;
HotCat.blacklist = /\b[Ss]tubs?$|^[Ss]tubs?\b|\b[Dd]isambiguation pages$|^[Rr]edirect(?:s|ed)?\b/;


Line 13: Line 13:
HotCat.del_needs_diff = true;
HotCat.del_needs_diff = true;


// Users will always go through the diff screen.
// Non-confirmed users will always go through the diff screen.
HotCat.no_autocommit = (function (default_setting) {
HotCat.no_autocommit = (function (default_setting) {
if ((mw.config.get('wgUserGroups').join(' ') + ' ').indexOf('autoconfirmed ') < 0) return true;
if ((mw.config.get('wgUserGroups').join(' ') + ' ').indexOf('confirmed ') < 0) return true;
return default_setting;
return default_setting;
})(HotCat.no_autocommit);
})(HotCat.no_autocommit);

// Disable for non-logged-in users.
HotCat.disable = (function (default_disable) {
return function () {
if (!mw.config.get('wgUserName')) return true;
return default_disable();
};
})(HotCat.disable);


// Improve visual distinction between positive+ and negative- indicator icons.
// Improve visual distinction between positive+ and negative- indicator icons.
HotCat.existsYes = '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/P_yes.svg/20px-P_yes.svg.png',
HotCat.existsNo = '//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/P_no_red.svg/20px-P_no_red.svg.png';
HotCat.existsNo = '//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/P_no_red.svg/20px-P_no_red.svg.png';
}
}

Latest revision as of 04:45, 24 November 2023

if (typeof (HotCat) != 'undefined') {
  HotCat.uncat_regexp = /((?=[^{]|^)| )\{\{\s*([Uu]ncat(egori[sz]ed)?|[Nn]ocat|[Cc]ategori[sz]e)[^}]*\}\}/gm;
  HotCat.single_minor = false;
  HotCat.use_up_down = false;
  HotCat.upload_disabled = true;
  
  HotCat.messages.using = '.';

  //Blacklisted categories cannot be added through HotCat.
  HotCat.blacklist = /\b[Ss]tubs?$|^[Ss]tubs?\b|\b[Dd]isambiguation pages$|^[Rr]edirect(?:s|ed)?\b/;

  // Clicks on (-) will always go through the diff screen.
  HotCat.del_needs_diff = true;

  // Non-confirmed users will always go through the diff screen.
  HotCat.no_autocommit = (function (default_setting) {
    if ((mw.config.get('wgUserGroups').join(' ') + ' ').indexOf('confirmed ') < 0) return true;
    return default_setting;
  })(HotCat.no_autocommit);

  // Disable for non-logged-in users.
  HotCat.disable = (function (default_disable) {
    return function () {
      if (!mw.config.get('wgUserName')) return true;
      return default_disable();
    };
  })(HotCat.disable);

  // Improve visual distinction between positive+ and negative- indicator icons.
  HotCat.existsYes = '//upload.wikimedia.org/wikipedia/commons/thumb/b/be/P_yes.svg/20px-P_yes.svg.png',
  HotCat.existsNo = '//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/P_no_red.svg/20px-P_no_red.svg.png';
}