Y
Hacker News
new
|
ask
|
show
|
jobs
by
jdnier
3253 days ago
Works in Firefox, not in Chrome (at least on MacOS).
3 comments
yorwba
3253 days ago
What about
data:text/html,<script>alert(2+2)</script> ?
link
ConfucianNardin
3253 days ago
Works in both Chrome and Firefox.
link
tomc1985
3253 days ago
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.
link
striking
3253 days ago
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...
link
johnhenry
3253 days ago
Works if you type it out. If you paste it, the "javascript:" part will be omitted.
link
abhinickz
3253 days ago
Above works even if you paste it.
link