Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jdnier
on July 28, 2017
|
parent
|
context
|
favorite
| on:
Show HN: The JavaScript Way, a book for learning m...
Works in Firefox, not in Chrome (at least on MacOS).
yorwba
on July 28, 2017
|
next
[–]
What about
data:text/html,<script>alert(2+2)</script> ?
ConfucianNardin
on July 28, 2017
|
parent
|
next
[–]
Works in both Chrome and Firefox.
tomc1985
on July 28, 2017
|
prev
|
next
[–]
Doesn't work in Chrome (edit: or Firefox for that matter) for Windows either... that's a shame. Abusing javascript: is a really useful trick for lots of little hacks.
striking
on July 28, 2017
|
parent
|
next
[–]
It's also an attack vector for hacks. You can enable it on some browsers if you please, but having it off by default is sensible...
johnhenry
on July 28, 2017
|
prev
[–]
Works if you type it out. If you paste it, the "javascript:" part will be omitted.
abhinickz
on July 28, 2017
|
parent
[–]
Above works even if you paste it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: