User:Begoon/vector.js: Difference between revisions

Content added Content deleted
(// mediawiki:MediaWiki:Gadget-UTCLiveClock.js - because local gadget is throwing errors (mw.util is not defined?))
(external load of Clock gadget seems to solve the errors, so it seems this was not the issue)
Line 16: Line 16:
mw.loader.using('mediawiki.util').then(function () {
mw.loader.using('mediawiki.util').then(function () {
var conf = mw.config.get(['wgServer', 'wgScript']),
var conf = mw.config.get(['wgServer', 'wgScript']),
url = conf.wgServer + conf.wgScript + '?title=' + mediawiki.util.wikiUrlencode(pageName) +
url = conf.wgServer + conf.wgScript + '?title=' + mw.util.wikiUrlencode(pageName) +
'&action=raw&ctype=text/javascript';
'&action=raw&ctype=text/javascript';
mw.loader.load(url); }); };
mw.loader.load(url); }); };