Questions tagged [javascript]
GENERAL QUESTIONS ABOUT JAVASCRIPT ARE OFF-TOPIC. This tag is for questions relating specifically to the use of JavaScript on the Stack Exchange sites.
225 questions
258
votes
7
answers
15k
views
Providing a JavaScript API for userscripts
Over the years, a number of community members have developed unofficial browser userscripts to add or supplement functionality on our platform. While we do have an official API, these scripts ...
114
votes
1
answer
2k
views
The cardiologist can't tell if my heart is beating!
I have found a... strange, to say the least, error on Stack Overflow. I was just browsing normally and I decided to open the error console, and I saw this:
Uncaught TypeError: Cannot call method '...
76
votes
4
answers
2k
views
We're Migrating our JavaScript
TL;DR: We’re making a substantial repayment on our JavaScript technical debt. Apologies in advance for any bugs as we work through it!
An administrative note: Rather than posting bug reports as ...
70
votes
1
answer
2k
views
Make Stack Exchange sites compatible to OS X Lion full screen mode
Introduction
Mac OS X Lion has a full screen feature that allows use of a single application window in full screen, i.e. without window title bar and constantly visible menu bar, on its own virtual ...
66
votes
3
answers
5k
views
Load jQuery from Stack's CDN if Google's CDN is blocked (or always)
Google's CDN is nice, but it's not 100% reliable for all users. It occasionally fails to load for me. Other users have had trouble with it due to sloppily-configured networks, and some may prefer to ...
64
votes
52
answers
2k
views
Essential Stack Exchange user scripts and the dependencies they utilize
As part of our discovery for providing a JavaScript API for user scripts, we want to know what user scripts you're currently using. This can be used to report user scripts that you use and the global ...
50
votes
1
answer
713
views
2023 DOM Changelog for Userscript Community
Here's a thread to catalog any minor DOM updates we do throughout 2023 just to give folks in the user community a bit of a heads up and an official source of documentation around any DOM changes.
...
37
votes
1
answer
639
views
JavaScript is broken
Some things I noticed:
Editing inline is broken
The editing toolbar is missing on the old editor
Tags don't appear
Can't "Review question" to be able to post normally
An error is present ...
32
votes
11
answers
8k
views
"Stack Overflow requires external JavaScript from another domain" message
http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js is error 404
Well, it seems that Wget picks it up so the last statement is false and the exact message is:
Error 6 (net::...
30
votes
1
answer
459
views
Help me reverse-engineer Unicoin [closed]
Here; have the full, uncompressed source code for Unicoin you code monkeys!
http://dev.stackoverflow.com/content/js/stub-uc.js
This section looks pretty interesting:
var loadingVersions = {};
var ...
28
votes
5
answers
412
views
How to effective mine more Unicoins by hammering rocks? [duplicate]
I've clicked the hell out of this Unicorn-app and almost destroyed my mouse - got some suggestions on how to be more effective mining Unicoins?
I mean, there must be some javascript-hack?
Placed ...
27
votes
1
answer
562
views
Review queues not working because of JavaScript error
For some users, reviewing is not possible at the moment; the queues show up blank. Both active queues and completed review items are not visible, probably because of a JavaScript error:
I'm using the ...
27
votes
1
answer
146
views
Can't flag or close questions on all sites
Whenever I try to flag or close a question here, when clicking the submit button the button gets disabled, three dots animating and nothing really happens.
JS console show a single error:
Flagging:
...
25
votes
5
answers
262
views
Eeeeek! MSO JS is all borked!
I just noticed that clicking a JS-like link on MSO (like to show more hot network questions) just bumps me to the top of the page and doesn't do anything else.
Also, adding a comment or any other JS-...
24
votes
1
answer
438
views
Cookies and JavaScript for teststackoverflow.com — legitimate?
Can someone authoritative explain what the cookies that teststackoverflow.com wants to set are for (tracking — I know, but tracking what, and what's wrong with the regular stackoverflow.com and is ...
20
votes
1
answer
5k
views
What is formatunicorn for strings?
This is a serious post about unicorns!
Here is a unicorn for everyone's enjoyment
But in all seriousness, I was testing out some stuff for a Javascript question on strings, so I opened up the ...
20
votes
1
answer
312
views
The PGN Viewer (replayer) stopped working on Chess Stack Exchange
On Chess Stack Exchange, there is a jQuery plugin which is integrated to display diagrams like this:
Today (1 February 2022), at around the time when this chess question was first posted, the PGN ...
18
votes
1
answer
3k
views
JavaScript on whole site is broken in IE (9 or less) because of stub.js
Using IE 9 or less, I'm getting a JS error "Object is required" on line 1, position 137 in stub.js.
The script stops and the StackExchange object does not get initialized, so later there are "Object ...
18
votes
2
answers
312
views
Unable to perform actions such as deleting comments
The last couple days I've been largely unable to delete comments and perform some other actions on Music. Occasionally it works after a fresh page load but it seems to be completely at random.
...
18
votes
2
answers
166
views
Links on user page are assembled to the wrong destination
I'll admit that I don't know how your pages are constructed, and it might not even be possible to fix this problem. However, recently we had an issue where a user was unable to use his userpage ...
18
votes
1
answer
1k
views
Scrolling on Stack Overflow is slow if a question has lots of answers
Chrome Version: Google Chrome 70.0.3538.77 (Official Build) (64-bit)
OS: Ubuntu
Try opening one of these pages:
How do I create a URL shortener?
How to use a decimal range() step value?
...
17
votes
4
answers
400
views
JavaScript is broken on meta
I'm getting this error in Firebug:
TypeError: l is undefined
https://meta.stackoverflow.com/content/Js/full.en.js?v=29537078da9e
Line 45
The icons in the top bar aren't clickable and I don't ...
16
votes
4
answers
2k
views
JavaScript answers using ES5 features: Warn or not?
I recently saw an answer to a JavaScript question where the answer used Array#filter without mentioning that it's a new feature of JavaScript as of ECMAScript 5th edition (aka ES5), so I commented ...
16
votes
1
answer
169
views
Eeeek! Can't start a bounty on any question
Trying to start a bounty, on any question, results in this:
Please fix, in the dev tools I noticed a request to non existent URL.
This happens in all SE sites as far as I could see.
16
votes
3
answers
1k
views
Dreaded error: "Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load"
I'm a huge fan of SO and also a IE user. I cannot use Firefox or Chrome because of company policy. So I get the dreaded error above.
Based on other posts of SO I have tried the following:
Typing the ...
16
votes
0
answers
1k
views
JS broken on older web browsers due to undefined 'globalThis'
It seems a recent change in StackExchange has rendered it no longer working correctly on my browser (Firefox 60.7esr). The error message is:
ReferenceError: globalThis is not defined
As a result, ...
16
votes
0
answers
1k
views
Script error: Missing polyfill for replaceAll
This is a bug report for Stack Exchange frontend code (sstatic.net); don't close it as off-topic!
Script error: Missing polyfill for replaceAll
On older browsers, the site is broken. I can't click on ...
15
votes
1
answer
326
views
What are the selected vote button colors?
Edit: user3840170's stylesheet does what I was planning to do, and is a cleaner solution than anything I would have come up with.
I'm working on a userscript to reverse the upcoming vote button ...
14
votes
4
answers
1k
views
How do I enable jQuery?
I just saw this for the first time after a delayed page load:
Stack Overflow works best with jQuery
enabled
I looked for the "Enable jQuery" setting, but my browser doesn't have it.
It sounds ...
14
votes
1
answer
348
views
Comment character counter does not trim, while the server does
In the comment field on StackOverflow (and other StackExchange sites as well, I presume) you're required to write 15 characters for the server to accept your post. If a shorter post is submitted, an ...
13
votes
3
answers
345
views
"Add comment" button no longer working on any Stack Exchange site for Internet Explorer 8
Today at 12:30 PM CST, the "add comment" button stopped working on any Stack Exchange site for Internet Explorer 8. It cites a javascript error.
(Edit: I'm not using Compatibility Mode, and ...
13
votes
1
answer
525
views
Toast notifications are not being shown; a TypeError in `StackExchange.helpers.showToast` is thrown instead
Some toast notifications (i.e. those banners as shown in this screenshot) are not being shown; an error is visible in the console instead.
This bug applies to Meta Stack Overflow and Meta Stack ...
13
votes
1
answer
263
views
Error on line 216139361?
Just wondering.
Recently I started seeing fun JS errors in IE8.
Syntax error
Line: 216139361
Symbol: 20
Code: 0
Or:
Syntax error
Line: 216010057
Symbol: 20
Code: 0
They happen ...
12
votes
1
answer
960
views
Was support for the SeaMonkey browser just removed?
For years I've been browsing the site using the SeaMonkey Gecko-engine-based browser. It has the following user agent:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0 ...
12
votes
0
answers
85
views
Attempting to protect a question that is no longer eligible for protection silently fails
I opened a question that had just gotten a new answer. The answer scores were as follows:
65
10
7
4
-1 (new answer)
0 (deleted)
0 (deleted)
-2 (deleted)
The protect link was present on the question. ...
11
votes
1
answer
4k
views
Can I use the tag textbox script?
I love the "Tags" textbox on Stack Exchange. It looks like a hassle and a half to write though, so is there a free "label textbox" scripts I can use?
Alternatively, is the one on Stack ...
11
votes
1
answer
92
views
Why is text disappearing from my answer? This doesn't happen when I disable javascript
Take a look at the answer here:
music.stackexchange answer
I use semi-ascii formated tables.
They show up in editing mode.
But they disappear shortly after 1 sec when the question page loads.
When ...
11
votes
1
answer
1k
views
I'm getting "Uncaught ReferenceError: Stacks is not defined" errors in my browser console on Stack Exchange sites
The last few weeks the amount of 'Stacks is not defined' errors is increasing.
This occasionally occurs on any StackExchange site, and throws the following error in the console [1]:
Uncaught ...
11
votes
3
answers
2k
views
Why did Stack Overflow use onclick JavaScript on the homepage?
This is a technical question about the way SO implements a feature.
Why does SO use JS to direct the user to the question page if they click on the votes/number/views on the question list on the ...
11
votes
1
answer
153
views
Preview Breaks with Invalid Tag Name [tag:+]
In the formatted preview for Questions & Answers, typing a tag link with an invalid tag name "crashes" the preview. As soon as you type the following the preview stops updating and an error can be ...
11
votes
0
answers
194
views
When JavaScript is disabled, sort orders other than "votes" are buggy
I normally browse Stack Exchange with JavaScript disabled, and reading, searching, etc. mostly work just fine in that context. However, sort orders other than "votes" are broken, for users ...
11
votes
0
answers
79
views
When VTCing as dupe, if the question you're on gets edited before you VTC, the whole question goes blank
To reproduce:
Open up the VTC as duplicate interface
Click on an original question (this can also be done after the edit notice appears in the next step)
Wait for the question to be edited, so that "...
10
votes
4
answers
5k
views
Is there an official SO version of the WMD editor available for download? [duplicate]
Possible Duplicate:
Where's the WMD editor open source project?
I'd like to know if the version of Markdown that SO uses, with the same header with blank background and the same help button ...
10
votes
1
answer
69
views
Voting writes a debugging message to the javascript console
If you vote on any question or answer, the javascript console log spits out:
isElectionPrimary: false
This comes from full.en.js line 184:
console.log("isElectionPrimary: "+c);
10
votes
1
answer
171
views
Policy on third-party JavaScript integration on SE sites
Topic
Should Stack Exchange sites utilize third-party scripts or libraries to augment the user experience on the SE sites in such a way that they provide additional information without the need for ...
10
votes
0
answers
202
views
How did "JavaScript is broken on meta" and my answer get upvoted while JavaScript was still broken on meta?
Would comment on my answer, but I couldn't as JavaScript was still broken on meta at the time.
Would add another answer, but I couldn't as JavaScript was still broken on meta at the time.
Therefore ...
9
votes
4
answers
1k
views
Stack Exchange changes broke UI on multiple legacy browsers - Again
The previously reported and resolved issues of broken UI behaviour on legacy browsers (Latest Stack Exchange changes broke UI on Firefox Android), specifically, Firefox 68.11.0 (the last one before ...
9
votes
2
answers
206
views
How are the "New Answer" notifications implemented in stackoverflow.com?
Somebody knows if the "There are new answers" notifications appearing at the top of the page while answering a question are retrieved using periodic polling or making use of some kind of comet/long-...
9
votes
1
answer
197
views
Sometimes a SyntaxError is logged to console while viewing questions on Stack Overflow
I am not sure if it is related to the Stack Exchange network, but the Developer Tools in Chrome sometimes log an Uncaught SyntaxError: JSON.parse while viewing questions on Stack Overflow. The ...
9
votes
1
answer
156
views
JS on timeline page is broken
I was looking at this timeline for very boring, uninteresting reasons. The JS (and, consequently, responsive elements) on that page is broken.
Console:
VM3535:6 Uncaught ReferenceError: Invalid left-...