Page MenuHomePhabricator

Set up basic user-script
Closed, ResolvedPublic

Description

Now that the code is hosted at https://transcriber.toolforge.org we need to get it to a point where it can be loaded as a user script on Wikisources with something like the following in common.js:

mw.loader.load( 'https://transcriber.toolforge.org/gadget.js' );

This will involve changing some of the system of packaging so that the wrapper code (as seen for example in https://ban.wikisource.org/wiki/Sang_Angangg%C3%A9:SGill_(WMF)/common.js ) is not needed in common.js but instead is part of the tool's code.

The idea is to set up a script end point that will mean it's not necessary for users to update their common.js when there's a change to the code. This will mean we can roll out updates more easily, and everyone will get the latest code.

(Long-term, this is perhaps not the best way to do it, but it replicates the status quo and will serve as a reasonable next step in development.

Details

Due Date
Dec 12 2022, 5:00 AM

Event Timeline

There are some other useful ideas about packaging gadget code in this project: https://github.com/wikimedia-gadgets/modular-wiki-userscript-base

SGill set Due Date to Dec 12 2022, 5:00 AM.Dec 8 2022, 7:06 AM

The patch that was merged can be found here

PMenon-WMF moved this task from In progress to Completed on the Transcriber board.