User talk:Mr.Z-man/refToolbar 2.0.js

Latest comment: 13 years ago by Mr.Z-man in topic Redundant code

Redundant code

edit

Isn't the following code redundant since it is included in User:Mr.Z-man/refToolbar.js?

if (wgServer == "https://secure.wikimedia.org") {
  importScriptURI("https://secure.wikimedia.org/wikipedia/en/w/index.php?title=User:Mr.Z-man/refToolbar_2.0/base.js&action=raw&ctype=text/javascript");
} else {
  importScriptURI('http://en.wikipedia.org/w/index.php?title=User:Mr.Z-man/refToolbar_2.0/base.js&action=raw&ctype=text/javascript');
}

Kaldari (talk) 21:21, 18 January 2011 (UTC)Reply

Its leftover from when the instructions said that you should import this script directly. I'm not sure if that actually works anymore though. importScriptURI caches everything it imports, so in the worst case, this is doing practically nothing. Mr.Z-man 23:36, 18 January 2011 (UTC)Reply