Questions tagged [javascript]

JavaScript is a programming language. Programming questions are off topic here; ask on Stack Overflow instead.

Programming questions for JavaScript are off topic here; ask on Stack Overflow instead. This tag is for questions about how to handle JavaScript files or interact with them using software such as browsers or text editors.

ECMAScript, JavaScript & JScript

ECMAScript was developed as a standardization of Netscape's JavaScript and Microsoft's JScript. The canonical reference is The ECMA-262 Language Specification. While JavaScript and JScript aim to be compatible with ECMAScript, they also provide additional features not described in the ECMA specifications. Other implementations of ECMAScript also exist.

The Basics

The Mozilla Developer Center offers good documentation on JavaScript.

JavaScript is most often used in the browser - see The Document Object Model.

Learning JavaScript

880 questions
20
votes
3 answers

Javascript trick? How does scribd make it difficult to even copy & paste text

Lately, I have seen that scribd makes it very difficult for users (free users) to browse through a document hosted on their site. There is no ability to search within a document, let alone being able to download the same. Using javascript, they load…
9
votes
2 answers

Javascript alert box unblock on Mozilla

I have blocked Javascript alert messages on my Mozilla browser and now I want to turn them back on, but I can't figure out how. Does anyone else have this problem?
K.I
7
votes
4 answers

How to stop a repetitive alert box?

Recently a colleague forwarded a website link to us saying it was a funny site. After you click on the link, you are stuck in an infinite loop of annoying alert boxes. The only way to stop that was by killing the browser from the task manager. After…
dsr
  • 303
5
votes
1 answer

uglifyjs - hangs when run with any options

The issue I'm using uglify-js to minify some js code. I am using it like so: uglifyjs --compress --mangle file.js -o outfile.min.js However, this causes it to hang and never complete. I can get a successful output from uglify if I remove…
5
votes
2 answers

How block 1 specific javascript file on the website?

This seems to be a frequently asked question but with no working answers as of now. I have tried almost every single chrome extension out there, but there's none which allows me to block JS at a script level. All they do is block at a domain level,…
3
votes
1 answer

How to save a web app to static HTML?

I have a webapp that I want to save the HTML of to create a static version of a page I can send to someone. Obviously 'save as' won't work. Is there a way to save the currently displayed DOM as HTML, even when it has been created by…
2
votes
1 answer

How to correctly use javascript:alert(document.lastModified); to check a website last update?

I read many webpages. They said that I could use javascript:alert(document.lastModified); to find the last update of a site. I test at least 10 websites. Only the website that I made gives me the right information. All the others show the current…
Marco
  • 245
2
votes
1 answer

Where comes the $ Function from, when jQuery is not loaded?

I recoginzed that i can use $('span') even when no js-framework is loaded. It works in FF, Chrome and Edge. Where does this function come from? I had never read about it. Is it a HTML5 feature?
wutzebaer
  • 437
1
vote
1 answer

Error: Unterminated String Literal

First off, I am NOT a web developer; I'm not building websites; I just want to surf the internet in peace. However, today I've started receiving this error over and over again on every website I go to. How do I make it stop? I'm using…
1
vote
1 answer

Rewrite URL in Bookmarklet

I am relatively new to javascript and I want to code a javascript-bookmarklet which is able to rewrite a URL from http://www.xyz.com/test/stuff/video129852_zc-7931f8bf_zs-2d7967f4.html to http://www.xyz.com/other-directory-thing/video129852.html in…
Martin
  • 11
1
vote
1 answer

Go to a page with an internal hyperlink to a video stream

When you go on a page and you click on something that calls up a javascript (like sections on Wikipedia that generate the '#...' in the URL) the URL changes in the address bar of your browser. On Wikipedia, I can just use a link the includes the…
1
vote
2 answers

Is there a tool or something that can "listen" to javascript functions called on a webpage?

I was wondering if there is a tool, or something like this for intercepting JavaScript functions when they're called on a webpage, for example let's say I'm on a webpage and I press on Up Arrow key which has an event attached to it that calls a…
Meds
  • 359
1
vote
1 answer

Open browser type with javascript window.open()

Is it possible to open a specific browser type i.e. Google chrome, Firefox, Chromium using the window.open() method? For instance, I have Google chrome, Firefox and chromium installed on my system and would like to specify which one to open…
Larry
  • 11
1
vote
1 answer

JavaScript to login account not working

Code that automatically go to login page and click login: javascript: window.location = 'https://1.1.1.1/login.HTML'; while (true) { if (document.readyState == "complete") { window.onload(document.forms[0].Submit.click()); …
fronthem
  • 173
  • 6
1
vote
0 answers

How to add "auto rotate" and rotation direction and speed to a JavaScript application?

CalcPlot3D is an interactive JavaScript app for plotting math equations. Clicking on the 3D plot window and dragging the mouse on the plot will rotate the surface in the direction you move the mouse about the focus point (the origin, by default).…
Armadillo
  • 133
1
2 3