Page MenuHomePhabricator

Create XTools API with namespace endpoint, using JS to update to namespace selector
Closed, ResolvedPublic3 Estimated Story Points

Description

The old XTools had an API that was used for a gadget, among other things. We want to create a new API service, but as a starting point let's only add a namespace endpoint. With that we can use JS to dynamically update the namespace selector when they change the project. If they happen to enter an invalid project, an error message will be shown and the project input field will revert back to the last valid value.

Currently forms in XTools that have a namespace selector include Pages created and Top edits.

Event Timeline

MusikAnimal set the point value for this task to 3.Apr 11 2017, 10:38 PM

Note T163527 means currently the API and namespace selector will break if you try certain projects like es.wikipedia.org or sq.wikinews.org

Samwilson subscribed.

This works in my testing.

I've made one slight change for T160721 that should take care of when there's no 'all' option (it was cloning the first <option> regardless, resulting in a duplication of Article).