Some gadgets and user scripts, like the nameGuzzler and the beta version of the labellister are having JavaScript issues.
The JavaScript console mentions the following:
ReferenceError: Can't find variable: async
Some gadgets and user scripts, like the nameGuzzler and the beta version of the labellister are having JavaScript issues.
The JavaScript console mentions the following:
ReferenceError: Can't find variable: async
The issue seems to be the Primary Sources gadget, added a issue to the GitHub project: https://github.com/google/primarysources/issues/95
Because of T108655: Standardise on how to access/register JavaScript interfaces, ResourceLoader closures have a module argument, causing files written for multiple environments like https://www.wikidata.org/wiki/MediaWiki:Gadget-PrimarySources-async.js to think they're running in Node.js instead of a browser. https://www.wikidata.org/wiki/?diff=328368494&oldid=308869398 should fix the bug.
Thanks, that seems to fixed the issue. Can you also do a pull request on the GitHub project, to avoid introducing the error again? Also weird that this wasn't mentioned in the tech news.
Perhaps it'd be cleaner to split MediaWiki:Gadget-PrimarySources-async.js into its own hidden gadget (i.e. ResourceLoader module), make the 'real' gadget depend on it and require() it.