Skip to main content
117 votes

Providing a JavaScript API for userscripts

As a quick preface, I think I will not be alone in saying this: thank you. This is very good news, and a sign of goodwill towards the community - the project has the potential to streamline userscript ...
Oleg Valter is with Ukraine's user avatar
53 votes

We're Migrating our JavaScript

Quite a few user scripts rely on certain (undocumented?) properties of the StackExchange object. For example, the popular AutoReviewComments - Pro-forma comments for SE uses StackExchange.ready and ...
Glorfindel's user avatar
  • 252k
45 votes

Providing a JavaScript API for userscripts

Reliable HTML/CSS and UI manipulation Relying on SE's HTML/CSS to work a certain way is, from what I've seen, the most common thing that breaks userscripts. As an example, adding items under the title ...
Radvylf Programs's user avatar
34 votes

We're Migrating our JavaScript

This process sounds like a lot of work. I wish you well in doing it. When you release each of these changes, please tell us what changed, at least what area of functionality changed (e.g. just add/...
Makyen's user avatar
  • 24.5k
32 votes

Providing a JavaScript API for userscripts

Custom events on post creation/deletion/edition, etc. Userscripts that add buttons to the post menu, that interact with the comments section or change the review interface need, more often than not, ...
double-beep's user avatar
  • 6,341
32 votes
Accepted

2023 DOM Changelog for Userscript Community

DOM Changelog Date Change 2023‑01‑09 Update .comment-up-undo to .js-comment-up-undo to be inline with our js-* naming standard 2023-02-03 Update .comment-up to .js-comment-up to be inline with our ...
31 votes
Accepted

JavaScript is broken

So, we're upgrading to Google Analytics 4, because whoever owns GA decided GA3 (Universal Analytics) isn't good enough and will be discontinued in a few months (July 2023). During this transition we ...
Felippe Rangel's user avatar
  • 5,114
28 votes
Accepted

Review queues not working because of JavaScript error

My bad! I was canary testing some JS infrastructure changes on one of our nine web servers (namely NY-WEB09, which as the name suggests is located in our data centre in... New Jersey). The bug which ...
Benjamin Hodgson's user avatar
27 votes
Accepted

Essential Stack Exchange user scripts and the dependencies they utilize

If you add an answer, please also add the userscript name (with a link to your answer) to the appropriate section of the table below. window.StackExchange Property/Method Scripts (one per line, link ...
19 votes

Providing a JavaScript API for userscripts

(Keep) eating your own dogfood Otherwise known as dogfooding, it would mean that you made sure that whatever API you provide for the community, you make sure are used internally as well. I am not very ...
AncientSwordRage's user avatar
17 votes

Essential Stack Exchange user scripts and the dependencies they utilize

Userscript name: Advanced Flagging Primary audience: power users, content curators, people who like flagging posts a lot in general. Brief description: adds an "Advanced Flagging" menu to ...
Marco Bonelli's user avatar
16 votes
Accepted

Exploiting Stack Exchange with the browser console

You can't hack the parent site when using Stack Snippets since those are loaded in a sandboxed iframe. You also can't hack from the browser console since voting HTTP requests has to come from the ...
Patrick Hofman's user avatar
16 votes

Stack Exchange changes broke UI on multiple legacy browsers - Again

Looks like it may have been caused by an optional chaining operator in some JavaScript once again. I'm seeing the following error in my error console for Meta: Timestamp: 3/1/2022, 3:09:41 AM Error: ...
dbc's user avatar
  • 4,025
15 votes

Providing a JavaScript API for userscripts

If we tried to make userscript development better, what improvements could we make for you? As always documentation is key. Maybe a "getting started"-document with the stable(!) ids and ...
Björn Büttner's user avatar
15 votes
Accepted

What are the selected vote button colors?

You don't want a complete list here, because of code simplicity and because sites may get new / updated themes. Instead, I would indeed just call getComputedStyle(document.body).getPropertyValue('--...
Glorfindel's user avatar
  • 252k
14 votes

Providing a JavaScript API for userscripts

Share the documented internal JavaScript files that userscripts will interact with on the front end Share documented endpoints that AJAX will interact with Share documented sockets that userscripts ...
Travis J's user avatar
  • 33.7k
14 votes

Essential Stack Exchange user scripts and the dependencies they utilize

Userscript name: "View Vote totals" without 1000 rep Primary audience: <1k users Brief description: Currently, it's not possible for users without the "established user" ...
double-beep's user avatar
  • 6,341
14 votes

Stack Exchange changes broke UI on multiple legacy browsers - Again

This is now fixed. Thanks for highlighting the specific optional chaining usage here. Because this was an isolated instance where it was easy to rewrite the logic to not use optional chaining, I was ...
Yaakov Ellis's user avatar
  • 63.3k
13 votes

We're Migrating our JavaScript

EDIT: This issue is reported as fixed in this comment. Thank you! There have already been three bug reports from desperate souls for whom essentially all JavaScript stopped working, apparently ...
Emil Jeřábek's user avatar
13 votes
Accepted

Eeeek! Can't start a bounty on any question

Thanks for reporting this. It has been fixed across the network now and you should be able to add bounties until your heart is content. Thanks to balpha who smashed the bug very quickly.
Taryn's user avatar
  • 51.5k
13 votes

Essential Stack Exchange user scripts and the dependencies they utilize

Userscript name: AutoReviewComments (Machavity fork, but there's bound to be others) Primary audience: SOCVR canned comment list users Brief description: I still use the super-old AutoReviewComments. ...
Machavity's user avatar
  • 27.2k
12 votes
Accepted

Stack Exchange sites fail to load CSS and several JavaScript resources with AdBlock enabled

This is caused by an error in Easylist. See GitHub. All sites with an N anywhere have resources blocked, including cdn.sstatic.net. It should be fixed now. Make sure to update Easylist to get the ...
Erik A's user avatar
  • 8,755
11 votes

Was support for the SeaMonkey browser just removed?

Seamonkey never was supported as it's not a major browser. You were fortunate that it worked for as long as it did, though.
Makoto's user avatar
  • 58.3k
11 votes

Load jQuery from Stack's CDN if Google's CDN is blocked (or always)

Here's a practical solution for users: Fortunately there's this addon called LocalCDN that works exactly as its name suggests: It blocks those requests to CDNs and loads up those resources locally, ...
user153330's user avatar
10 votes
Accepted

The PGN Viewer (replayer) stopped working on Chess Stack Exchange

This should be fixed now. I think it was a Webpack bug. The chess code is set up to be loaded dynamically by the Webpack runtime system, but it had also been configured as an (unused) entry point in ...
Benjamin Hodgson's user avatar
9 votes
Accepted

JS on timeline page is broken

Jeremy Banks wins: that hack was overzealously replacing commas everywhere, even inside scripts. It has been replaced with, hum, a more proper hack.
Konamiman's user avatar
  • 2,596
9 votes

Essential Stack Exchange user scripts and the dependencies they utilize

User script name: Stack Exchange CV Request Generator Primary audience: room members (owners, regulars or visitors) of SO Close Vote Reviewers (mainly), Charcoal HQ, Tavern on the Meta, SE Code ...
Marco Bonelli's user avatar
8 votes
Accepted

Where is the StackExchange JavaScript object documented?

As Nick Craver already mentioned the API for the client-side JavaScript object StackExchange isn't public. You can however rather easily obtain a non-minified version of that file from the Developer ...
rene's user avatar
  • 90.9k
8 votes
Accepted

Can a user script modify or apply syntax highlighting in SE sites?

You can make sure Prettify is loaded by invoking StackExchange.using('prettify', <callback>) in your script, which will then guarantee that PR is available in the global scope. I did this a ...
Tim Stone's user avatar
  • 58.2k
8 votes

Essential Stack Exchange user scripts and the dependencies they utilize

User script name: Stack Overflow Unofficial Patch (SOUP) Primary audience: General audience of all Stack Exchange sites, who frequently run into minor client-side issues in SE's current code Brief ...
Sonic the Anonymous Hedgehog's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible