User talk:Future Perfect at Sunrise/uploadscript.js

Latest comment: 12 years ago by Future Perfect at Sunrise in topic Easy to try demo

Easy to try demo

Being admin, you could move the script to some page in MediaWiki namespace and then make a link with withJS= parameter from MediaWiki:Common.js so people could try your script just by following the link (without having to edit user js file). — AlexSm 15:23, 3 February 2012 (UTC)Reply

Hey, thanks for the hint, but I'm afraid I'm not yet quite clear how this "withJS" works. Can you point me to something more concrete? Fut.Perf. 19:51, 3 February 2012 (UTC)Reply
Let's take the gadget "Add an [edit] link for the lead section of a page" (under Appearance) as an example. If you follow the link http://en.wikipedia.org/wiki/User_talk:Future_Perfect_at_Sunrise?withJS=MediaWiki:Gadget-edittop.js then you should see the top [edit] link even though you don't have this gadget selected in your preferences.
So if you move your script e.g. to MediaWiki:UploadScriptDemo.js then the link http://en.wikipedia.org/wiki/User:Future_Perfect_at_Sunrise/Upload_forms_draft?withJS=MediaWiki:UploadScriptDemo.js should load your script automatically. The "demo" should work as long as your script doesn't transfer users to another page. — AlexSm 20:18, 3 February 2012 (UTC)Reply
Wow, thanks, I had no idea this was possible. Fut.Perf. 20:25, 3 February 2012 (UTC)Reply