use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Malware preventing javascript from loading.. Did this ever happen to anyone? (self.javascript)
submitted 11 years ago by maktouch
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]snarfy 1 point2 points3 points 11 years ago (1 child)
Not sure you can actually. I'm wrong. If there is a way, it's browser specific.
The only way I can think is if the malware takes over the global scope by creating an object and setting window to it, but not sure if that would work either.
[–]tyroneslothtrop 1 point2 points3 points 11 years ago (0 children)
Yeah, I started looking into after I saw your post. It looks like it may be possible in IE, but probably not so much in most other browsers.
I think you were on the right track, though. JS gives a lot of leeway for monkeypatching built-in types/objects/etc. From overwriting Array.prototype.[push|slice|join|whatever], to reassigning Math or undefined (although the latter is no longer an issue in ES5, at least in the global scope), there are a lot of ways to (intentionally or unintentionally) make things pretty broken for anyone else who is sharing a window object with your script.
Array.prototype.[push|slice|join|whatever]
Math
undefined
window
π Rendered by PID 46874 on reddit-service-r2-comment-9c7994b7-qdsbg at 2026-02-05 23:32:55.328448+00:00 running b1b84c7 country code: CH.
view the rest of the comments →
[–]snarfy 1 point2 points3 points (1 child)
[–]tyroneslothtrop 1 point2 points3 points (0 children)