I tried to customise the toolbar using a user script, following the tutorial on MediaWiki.org; however, sometimes when I load it from my common.js
, I get this error in my console:
jQuery.Deferred exception: $(...).wikiEditor is not a function TypeError: $(...).wikiEditor is not a function
at quickMAR_add (https://en.moegirl.org/index.php?title=User:Leranjun/quickMAR.js&action=raw&ctype=text/javascript:52:19)
at https://en.moegirl.org/index.php?title=User:Leranjun/quickMAR.js&action=raw&ctype=text/javascript:60:12
at mightThrow (https://en.moegirl.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1o54dq6:49:598)
at process (https://en.moegirl.org/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=1o54dq6:50:269) undefined
What's even weirder is that it sometimes works and sometimes not… And it always works if I copy/paste the code into the console and execute it manually.
The source code is here, if it's necessary.