A user of one of my tools reported a JavaScript error, preventing her to authorise the tool via OAuth on www.mediawiki.org.
I can confirm the issue. Error message:
load.php?debug=false&lang=en&modules=ext.globalCssJs.user&only=scripts&skin=vector&user=Magnus+Mans…:1 Uncaught SyntaxError: Unexpected identifier
Problematic JavaScript code:
mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Magnus Manske/autodesc.js&action=raw&ctype=text/javascript");$(document).ready(function(){if(typeof mw.config.values.wgWikibaseItemId=='undefined'&&mw.config.values.wgAction=='view'&&mw.config.values.wgNamespaceNumber==0&&mw.config.values.wgDBname!='wikidatawiki'){var portletLink=mw.util.addPortletLink('p-tb','#','Create Wikidata item','t-wd_create');$(portletLink).click(function(){var url="https://tools.wmflabs.org/wikidata-todo/duplicity.php?wiki="+mw.config.values.wgDBname+"&page="+encodeURIComponent(mw.config.values.wgTitle);window.location.href=url;return false;});}})mw.loader.state({"ext.globalCssJs.user":"ready"});
Note the missing ";" before the final "mw.loader.state". Overzealous JS optimiser?