MediaWiki talk:Gadget-HotCat.js
This script, HotCat, is a JavaScript gadget which can be enabled or disabled in your Preferences. The documentation page is located at Help:Gadget-HotCat. |
i18n | Gadget translations:
|
Threads older than 180 days days may be archived. |
Mobile compatibility[edit]
I know full well that this gadget was made mobile-friendly quite a while ago. Exactly when did it happen? And how can I make Wiktionary's version of HotCat mobile-friendly as well? (I'm really horrible with code, by the way.) BlunderGhoul (talk) 20:24, 25 August 2022 (UTC)
- For others who are not infinitely blocked on Wiktionary: it was enabled on mobile in June last year. I don’t know if any other steps were necessary, but I don’t want to spend more time finding it out until someone actually needs it. —Tacsipacsi (talk) 21:13, 26 August 2022 (UTC)
- Did it work when it was enabled? Because currently it doesn't work well for me on Commons. It shows "Categorieën (++): (+)" on every page, so I guess one can add categories but one doesn't know the current categories. bdijkstra (overleg) 09:08, 21 February 2023 (UTC)
- Existing categories appear – and still do appear – only if you have “advanced mode” enabled in Special:MobileOptions (if you also think this is ridiculous, your vote at m:Community Wishlist Survey 2023/Mobile and apps/Display the categories on the mobile site for everyone is very welcome!). It’s strange that HotCat also appears when existing categories don’t, I suppose no one tested non-advanced mode… —Tacsipacsi (talk) 20:59, 21 February 2023 (UTC)
- Did it work when it was enabled? Because currently it doesn't work well for me on Commons. It shows "Categorieën (++): (+)" on every page, so I guess one can add categories but one doesn't know the current categories. bdijkstra (overleg) 09:08, 21 February 2023 (UTC)
Could a warning popup appear when adding a DAB cat while using HotCat?[edit]
The problem: If you try to add a Disambiguation category (DAB category) to a file or category using HotCat, you cannot see that it is a DAB category. It is undesirable to have files or categories in DAB categories. So a lot of DAB categories have files and/or subcategories, see Category:Non-empty disambiguation categories (not only due to HotCat). This problem is being discussed on Commons:Village pump#How to make a structural solution for not empty disambigious pages?, issue 2.
Possible solution: If you try to add a DAB cat via the edit tab, a warning pop-up appears. Could such a warning pop-up also appear when you try to add a DAB cat via HotCat? JopkeB (talk) 04:55, 20 October 2022 (UTC)
- Yes, it’s technically possible. The question is only whether there will be someone who implements it. 🙂 —Tacsipacsi (talk) 22:11, 20 October 2022 (UTC)
I have made a proposal on the Wishlist 2023, see meta:Community Wishlist Survey 2023/Multimedia and Commons#A warning popup when adding a DAB cat while using HotCat. --JopkeB (talk) 05:25, 25 January 2023 (UTC)
Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.
- change line 87 to
disambig_category: 'Disambiguation categories',
- because some jokers did these without announcing them to the whole commons community https://commons.wikimedia.org/w/index.php?title=Template%3ADisambig&diff=570708613 https://commons.wikimedia.org/w/index.php?diff=582136498 . RZuo (talk) 19:55, 20 March 2023 (UTC)
Capital letters in Georgian[edit]
Hi! This gadget is being used in the Multilingual Wikisource to add categories to pages in the Georgian language (language code "ka"). There's an issue with it: It forces the first letter to be uppercase. For the particular case of Georgian, it causes severe issues because of various incompatibilities in how capital Georgian letters are implemented on various systems. For all practical purposes, the Georgian alphabet doesn't actually use uppercase letters at all in real life, but since they are technically available in Unicode, software sometimes assumes that what is needed for Latin, Cyrillic, Greek, and some other scripts, is also needed for Georgian, but that is not true.
I wish toUpper() and other letter case functions were smart enough to work correctly with Georgian, but unfortunately they aren't. The easiest thing to do is probably not to apply these functions to category names that begin with Georgian letters, from ა (U+10D0) to ჿ (U+10FF).
There were also similar bugs in MediaWiki extensions, e.g. TT208139 and TT230559, but HotCat probably requires a separate fix.
Thanks! :) Amir E. Aharoni (talk) 13:56, 5 January 2023 (UTC)
- Actually, now that I think of it, I have a vague recollection that this was resolved already (maybe by @TheDJ?) in 2019, but apparently, it's still broken in the Multilingual Wikisource. Amir E. Aharoni (talk) 14:07, 5 January 2023 (UTC)
- ... Indeed, it was done here by @Krinkle, but I'm pretty sure that @TheDJ was involved, too :)
- Anyway, evidently, that fix wasn't enough. Amir E. Aharoni (talk) 14:10, 5 January 2023 (UTC)
Don't show ++ before any categories have been added[edit]
Jidanni (talk) 01:11, 15 February 2023 (UTC)
Enabling change tag at Czech Wikipedia's HotCat instance[edit]
Hello all! I tried to add a change tag (HotCat) at Czech Wikipedia, but I failed to figure out how to do so. I added a line to the local defaults file with no luck.
When evaluating HotCat.changeTag
in my browser console, I notice that the expression evaluates to HotCat
first, and then some other configuration is loaded and overrides it to an empty string. If I execute HotCat.changeTag = 'HotCat';
before saving an edit, it works.
Can I ask for help on how I can enable change tag for cs.wikipedia? Thanks!
CC @MIGORMCZ for awareness. Martin Urbanec (talk) 17:03, 19 February 2023 (UTC)
- @Martin Urbanec: I see the following line: while config is previously defined as
if ( conf.wgDBname !== 'commonswiki' ) HC.changeTag = config.HotCatChangeTag || '';
So it looks like it’s not really supported to override this at a per-wiki level, but you should be able to do it regardless. —Tacsipacsi (talk) 17:48, 19 February 2023 (UTC)// User configurations: Do this here, called from the onload handler, so that users can // override it easily in their own user script files by just declaring variables. JSconfig // is some feature used at Wikimedia Commons. var config = ( window.JSconfig !== undefined && JSconfig.keys ) ? JSconfig.keys : {};
- Seems mocking JSconfig did the trick! Thank you, @Tacsipacsi! Best, Martin Urbanec (talk) 18:03, 19 February 2023 (UTC)
- However, I think it’s rather a workaround than a solution (as JSconfig is for per-user configuration), HotCat should support it officially (e.g. by checking whether this tag exits using the query+tags API module instead of assuming that it exists only on Commons). —Tacsipacsi (talk) 18:22, 19 February 2023 (UTC)
- Certainly agreed, but it works for now, and I'm too lazy trying to write a patch for HotCat. If it ever happens, feel free to ping me so I can remove the local hack. Martin Urbanec (talk) 18:27, 19 February 2023 (UTC)
- However, I think it’s rather a workaround than a solution (as JSconfig is for per-user configuration), HotCat should support it officially (e.g. by checking whether this tag exits using the query+tags API module instead of assuming that it exists only on Commons). —Tacsipacsi (talk) 18:22, 19 February 2023 (UTC)
- Seems mocking JSconfig did the trick! Thank you, @Tacsipacsi! Best, Martin Urbanec (talk) 18:03, 19 February 2023 (UTC)
Mouse required[edit]
I note that just using TAB and ENTER and the arrow keys, one can almost get to a "Checkmarked" state. But try this: type in a unique category's name, but don't type the full name. Anyway the mouse is still required to select the full name. That's too bad web accessibility-wise. Jidanni (talk) 01:26, 16 March 2023 (UTC)
Why does HotCat always edit conflict?[edit]
Why does HotCat always edit conflict? Every time after I manually edit a page and then want to categorize, an edit conflict pops up. This is a bug and really irritating! How can it be fixed? ɱ (talk) 23:18, 30 March 2023 (UTC)
Not working with Timeless skin[edit]
Hi, is it normal that HotCat does not work with Timeless ? Thanks for your help. M0tty (talk) 23:19, 18 April 2023 (UTC)