Currently, Cat-a-lot requires users to manually select files to batch-edit categories. This becomes inefficient when dealing with categories containing thousands of files. This task proposes adding support for QuickCategories integration using PetScan + PagePile for large-scale category edits, improving usability and performance for power users.
**Features Currently Implemented**
- A toggle appears in the Cat-a-lot UI only on category pages when the category contains more than a defined threshold of files (currently set to 100 for testing).
- If the toggle is checked:
-- The entire media section is visually highlighted.
-- The counter updates to reflect the total number of files in the category (e.g., “1569 files selected”).
-- Clicking any action (+ / → / −) redirects to QuickCategories, generating a PagePile for the category using PetScan.
-- A descriptive title is generated for QuickCategories based on the action.
-- A notification informs users when QuickCategories opens and suggests checking popup blockers if nothing happens.
- If the user selects a large number of files manually (irrespective of the size of the current category), a confirmation dialog prompts whether to proceed with QuickCategories or Cat-a-lot's in-browser editing. Currently, the threshold is set low for ease of testing.
**To test**
Disable Cat-a-lot from your preferences and add the following to your [[ https://commons.wikimedia.org/wiki/Special:Mypage/common.js | common.js ]]:
```
mw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Adiba_anjum3/Gadget-Cat-a-lot-large-files.js&action=raw&ctype=text/javascript');
```
**Video Demonstration**
You can watch the following short video to better understand how the feature works.
**[[ https://drive.google.com/file/d/1uNrTIpITq-AufGMPUCV0pG4IjIOjnatw/view?usp=sharing | Video Link]]** - //The demo video was too large to embed here, so I’ve uploaded it to Google Drive.//
This is a bare-bones working version of the feature (currently limited to commons). It still needs refinement so feedback is very much appreciated.