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 ...
0Valt's user avatar
  • 11.4k
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
  • 270k
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 ...
rydwolf's user avatar
  • 5,212
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
  • 26k
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,411
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 js-*...
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
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
28 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

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
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
16 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,411
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,226
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
  • 270k
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.9k
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
  • 64.3k
14 votes

Clicking on the Stack Exchange bubble on the top bar doesn't do the usual dropdown, and kicks me to Stack Exchange.com on *some* sites

Update: This should be fully resolved. Thanks for your patience. In doing some refactors of our legacy JS structure, we missed some file imports that were getting rewritten in webpack and it caused a ...
KyleMit's user avatar
  • 13.1k
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
  • 30.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.7k
12 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
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,912
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.5k
11 votes
Accepted

What is StackExchange.options.site.negativeVoteScoreFloor?

It was part of an experiment that never graduated out of beta, based on code comments: // TODO: This was written for an experiment that did not graduate and can be removed. function normalizePostScore(...
rene's user avatar
  • 94.5k
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

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

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
8 votes
Accepted

Was access to unminified JS code via cdn-dev.sstatic.net deliberately removed?

A little background: when the Q&A application spins up it initializes individual site settings which includes probing a bunch of file paths to check for existence of certain assets (e.g. email ...
Dean Ward's user avatar
  • 9,859
8 votes
Accepted

I'm getting "Uncaught ReferenceError: Stacks is not defined" errors in my browser console on Stack Exchange sites

Shout out to rene for correctly identifying the cause of the problem! So what happened? Here's a little bit of history and description of the problem. Prior to starting our migration to Webpack, we ...
allejo's user avatar
  • 1,500

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