User:Nardog/CatChangesViewer
{{Infobox Wikipedia user script
|name=CatChangesViewer
|desc=
|browsers=Chrome, Firefox, etc. (ES2017+ needed)
|source={{ubl|User:Nardog/CatChangesViewer.js|User:Nardog/CatChangesViewer-core.js}}
}}
You can track additions and removals of a category by adding it to your watchlist, but categories with heavy traffic can often inundate the watchlist to the point of uselessness. With this script, you can see a list of recent additions and removals of a category on the category page itself, whether it's in your watchlist or not.
{{TOC right}}
Clicking Search on a category page will show you something like this (taken from :Category:Articles with missing files):
class="wikitable plainlinks"
! ± ! Date ! Page ! User ! Bot |
class="catchangesviewer-removal"
| − | [{{fullurl:Chess symbols in Unicode|oldid=983152831}} 15:23, 12 October 2020] ([{{fullurl:Chess symbols in Unicode|diff=983152831}} diff] | [{{fullurl:Chess symbols in Unicode|curid=528808&action=history}} hist]) | CommonsDelinker (talk | contribs) | Yes |
class="catchangesviewer-removal"
| − | [{{fullurl:Seth Curry|oldid=983151168}} 15:10, 12 October 2020] ([{{fullurl:Seth Curry|diff=983151168}} diff] | [{{fullurl:Seth Curry|curid=21713373&action=history}} hist]) | No |
class="catchangesviewer-addition"
| + | [{{fullurl:Seth Curry|oldid=983151142}} 15:10, 12 October 2020] ([{{fullurl:Seth Curry|diff=983151142}} diff] | [{{fullurl:Seth Curry|curid=21713373&action=history}} hist]) | 52.144.111.240 (talk) | No |
Installation
Add the following to your common.js or global.js:
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Nardog/CatChangesViewer.js&action=raw&ctype=text/javascript');
Or you may enable the script installer in {{myprefs|Gadgets}} and click "Install" in the infobox on this page.
Usage
If "Duplicates" is checked, only the most recent change on each page will appear (takes precedence over the other checkboxes).
Customization
The default number of changes to retrieve at a time, 50 by default (max: 500), and the number of lines per page, 20 by default, can be modified by adding lines like below to your common.js or global.js (this example doubles the numbers):
window.catchangesviewerDefaultLimit = 100;
window.catchangesviewerChangesPerPage = 40;
Limitations
- Changes older than 30 days cannot be retrieved.
- Changes through transcluded pages are not detected. A flipside of this is that if a template is edited so that it starts or ceases to categorize a page that trancludes it, but the cache of the page does not get purged until an edit is made, that edit gets registered as adding or removing the category even if it didn't change the transcluding part.
See also
{{User:Nardog/scripts}}