StackExchange to get information or perform actions on the page. That said, the
StackExchange object is an undocumented way to interact with a page on our platform on the client-side and was just an artifact of the way we were structuring our code internally.
StackExchange object and will instead import the properties and methods we need directly onto each page based on the functionality that is hosted there.
This leaves us with the question of how to handle the global
StackExchange object once we stop using it internally. We know that userscripts depend on this object existing and that removing the properties and functions that it makes accessible will prevent many scripts from continuing to work. Breaking changes are frustrating and we don't want to irreparably break userscripts.
We're reaching out to the userscripting community here in order to better understand your needs. Our objective will be to provide a stable set of client-site properties and functions that can be relied on by userscript authors. To that effect, we are interested in knowing:
- What are the most important userscripts that you use today? What properties or methods of
window.StackExchange(or any of our platform's other global objects) do those userscripts currently depend on?
- If we provided a more stable interface for this information, what would you like to see from it? For example, would officially published TypeScript definitions be helpful?
- If we tried to make userscript development better, what improvements could we make for you?
We are going to make an effort to avoid breaking functions and properties in the
window.StackExchange namespace that are used by userscripts in the near term, however at this point we cannot commit to supporting every specific function or property. That said, we believe that having documented and stable client-side resources available will be very good for the health of the userscript community in the long run and we are exploring our options for providing a stable, official scripting API.