The following gadgets appear to be causing JS error for users that load them. I don't have stack traces for them right now because of T259369 but have been able to manually replicate a few.
This task tracks identifying the source of the problem and helping get them fixed.
| Fixed? | Script | Test url | JS error | Maintainer
| | https://meta.wikimedia.org/wiki/User:Mike.lifeguard/blockOptions.js |https://www.mediawiki.org/wiki/Topic:Vlxq3or3tf4p1ozv | Uncaught ReferenceError: wgCanonicalSpecialPageName is not defined
| | https://meta.wikimedia.org/w/index.php?title=User%3AMike.lifeguard%2FaddTools.js&action=raw&ctype=text/javascript | https://www.mediawiki.org/wiki/Topic:Vlxq3or3tf4p1ozv |Uncaught TypeError: document.getElementById(...) is null
| | https://commons.wikimedia.org/w/index.php?title=MediaWiki%3AGadget-Cat-a-lot.js | https://ca.wikipedia.org/w/index.php?title=Diccionari_descriptiu_de_la_llengua_catalana&action=edit | (Uncaught ReferenceError: catALot is not defined) | ?
| x | https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js | https://ca.wikipedia.org/w/index.php?title=Plantilla:Infotaula_eleccions/proves&action=edit | Uncaught TypeError: regExpMatch is undefined [1], [[ https://en.wikipedia.org/w/index.php?title=User%3ACacycle%2FwikEd.js&type=revision&diff=972556715&oldid=948606121 | Error: Another textSelection API was already registered ]] | @Cacycle
| | https://meta.wikimedia.org/w/index.php?title=User:Xiplus/TwinkleGlobal.js | https://ca.wikipedia.org/wiki/Usu%C3%A0ria_Discussi%C3%B3:Aranya | Unknown | @Xiplus
| | https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js | https://ca.wikipedia.org/w/index.php?title=Usuari_Discussi%C3%B3:MarinaABC&action=submit | Unknown | Unknown
| | https://meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js | https://ca.wikipedia.org/wiki/Mass%C3%ADs_de_la_Maladeta | Unknown | Unknown
| | https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js | https://ca.wikipedia.org/wiki/Viquiprojecte:Doblatge_en_valenci%C3%A0 | Unknown | Unknown
| | https://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js | https://ca.wikipedia.org/wiki/Miriam_Escofet | Unknown | ?
= Replication steps
1) Take the URL in column "script"
2) Append `&action=raw&ctype=text%2Fjavascript&maxage=2419200&smaxage=2419200` to the end of the URL and pass it to mw.loader.getScript eg.
```
mw.loader.getScript('https://commons.wikimedia.org/w/index.php?title=MediaWiki%3AGadget-Cat-a-lot.js%2Fca&action=raw&ctype=text%2Fjavascript&maxage=2419200&smaxage=2419200' );
```
[1] Stack trace
```
Uncaught TypeError: regExpMatch is undefined
Find https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:9982
EditButton https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:8163
<anonymous> https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript line 4374 > eval:1
EditButtonHandler https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:4374
TurnOn https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:3699
Setup https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:2396
Startup https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:2080
<anonymous> https://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript:19206
index.php:9982:13
```