After I openned the page
https://pt.wikipedia.org/wiki/MediaWiki:Edittools.js
on Google Chrome (16.0.912.77 m) and typed the commands below I got the following results:
typeof EditTools
"undefined"
mw.loader.load(mw.config.get( 'wgScript' ) + '?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=005');
true
typeof EditTools
"undefined"
importScriptURI(mw.config.get( 'wgScript' ) + '?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=005');
<script src="/w/index.php?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=005" type="text/javascript"></script>
typeof EditTools
"object"
So, although mw.loader.load is supposed to be a replacement for importScriptURI, it doesn't woks in every case where importScriptURI worked.
For comparison, notice that it works if I use the full URL like this:
typeof EditTools
"undefined"
mw.loader.load('https://pt.wikipedia.org/w/index.php?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=005')
true
typeof EditTools
"object"
or a protocol relative URL like this:
typeof EditTools
"undefined"
mw.loader.load('//pt.wikipedia.org/w/index.php?title=MediaWiki:Edittools.js&action=raw&ctype=text/javascript&nocache=005')
true
typeof EditTools
"object"
See also