MediaWiki:Gadget-HotCat.js/local defaults
Tampaian
//<syntaxhighlight="javascript"> if (typeof (HotCat) != 'undefined') {
HotCat.messages.cat_removed = 'Mahapus Tumbung:$1'; HotCat.messages.template_removed = 'Mahapus {{Tumbung:$1}}'; HotCat.messages.cat_added = 'Manambah Tumbung:$1'; HotCat.messages.cat_keychange = 'Sunduk hanyar gasan Tumbung:$1: '; HotCat.messages.cat_notFound = 'Tumbung "$1" kada tahaga'; HotCat.messages.cat_exists = 'Tumbung "$1" sudah ada; kada ditambahakan.'; HotCat.messages.cat_resolved = ' (maugahakan Tumbung:$1)'; HotCat.messages.uncat_removed = 'Mahapus {{uncategorized}}'; HotCat.messages.using = ' mamakai HotCat'; HotCat.messages.multi_change = '$1 Tumbung'; HotCat.messages.commit = 'Simpan'; HotCat.messages.ok = 'OK'; HotCat.messages.cancel = 'Pasah'; HotCat.messages.multi_error = 'Kada kawa mahubungi paladén. Paubahan tumbung Pian kada kawa disimpan. ' +'Barélaan amun Pian kada nyaman.';
HotCat.category_regexp = '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii]';
HotCat.category_canonical = 'Tumbung';
HotCat.categories = 'Tumbung';
HotCat.disambig_category = null;
HotCat.redir_category = null;
HotCat.uncat_regexp = null;
HotCat.template_regexp = '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Tt][Ee][Mm][Pp][Ll][Aa][Tt]';
HotCat.template_categories = {};
HotCat.engine_names.searchindex = 'Indeks panggagaian'; HotCat.engine_names.pagelist = 'Daptar laman'; HotCat.engine_names.combined = 'Panggagaian gabungan'; HotCat.engine_names.subcat = 'Subtumbung'; HotCat.engine_names.parentcat = 'Supertumbung'; HotCat.tooltips.change = 'Ubah'; HotCat.tooltips.remove = 'Hapus'; HotCat.tooltips.add = 'Tambahakan tumbung hanyar'; HotCat.tooltips.restore = 'Pasahakan paubahan'; HotCat.tooltips.undo = 'Pasahakan paubahan'; HotCat.tooltips.down = 'Klik untuk mengubah dan menampilkan subtumbung'; HotCat.tooltips.up = 'Klik untuk mengubah dan menampilkan supertumbung'; HotCat.multi_tooltip = 'Mangganti babarapa tumbung';
//Blacklisted categories cannot be added through HotCat. HotCat.blacklist = /\b[Rr]intisan?$|\b[Hh]alaman paugahan/;
// 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.existsNo = '//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/P_no_red.svg/20px-P_no_red.svg.png';
// make HotCat auto-save always, even if multiple categories are changed
mw.loader.using("mediawiki.user", function () {
$('body').on( 'submit', '#hotcatCommitForm', function () {
// The variable "this" refers to the form. Its fields can be accessed directly, e.g.
// this.wpTextbox1 gives you the textarea containing the page text of the edit.
var submitType = this.wpDiff;
if (submitType && (!this.oldid || this.oldid.value == '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;
});
}); } //</<syntaxhighlight>