Hi,
In the old days (i.e. before ResourceLoader), one could load a user script from their own local machine using something like importScript('file:///home/user/script.js')
Today I tried to do something similar except that my script relies on RL modules (such as OOjs UI, MediaWiki API, etc). I couldn't get it to work. Some users on #mediawiki channel doubted it is at all possible to load a local script that uses RL modules. One user suggested GreaseMonkey but even that did not help. Note that I was using debug mode the entire time.
I was wondering if anyone has been successful doing what I desire, or knows how it can be done. For the record, the script I was trying to run through GM is at [1].
Thanks,
Huji
On Thu, Oct 27, 2016 at 10:24 PM, Huji Lee huji.huji@gmail.com wrote:
Hi,
In the old days (i.e. before ResourceLoader), one could load a user script from their own local machine using something like importScript('file:///home/user/script.js')
Today I tried to do something similar except that my script relies on RL modules (such as OOjs UI, MediaWiki API, etc). I couldn't get it to work. Some users on #mediawiki channel doubted it is at all possible to load a local script that uses RL modules. One user suggested GreaseMonkey but even that did not help. Note that I was using debug mode the entire time.
I was wondering if anyone has been successful doing what I desire, or knows how it can be done. For the record, the script I was trying to run through GM is at [1].
Thanks,
Huji
I'm surprised that ever worked. Most (all?) web browsers disallow remote websites from loading arbitrary files on your computer. If a web browser allowed remote websites to load arbitrary file:// urls, it would be a rather large security vulnerability.
-- Brian.
mediawiki-l@lists.wikimedia.org