I came across https://en.wikipedia.org/wiki/Special:AbuseFilter/960, which tries to log edits to others' user scripts. But, it checks these based on the page name. Thus, if a script is moved to a page that doesn't end in .js (https://en.wikipedia.org/w/index.php?title=Special:Log&logid=101101733), the filter can no longer catch it. Additionally, the filter's logic can lead to false positives (https://en.wikipedia.org/wiki/Special:AbuseLog/24565419) when a .js page isn't actually a script.
The solution is to add a new variable, content_model, that filters can use. This could also allow communities to more finely control the effects of (if actioned) T226926: Investigate separate user right for creating pages with custom content models