Reputation: 4438
You can type this into the address bar in Google Chrome and it works:
javascript:alert('hi');
However if you try to paste the same string into the adress bar you just get this:
alert('hi');
Is that by design? Or? Standards? Security?
(I am trying to find an easier way to use bookmarklets on mobile phones. Needed for a PWA.)
Upvotes: 1
Views: 3709
Reputation: 63
However, this one works with Chrome and Firefox:
data:text/html,<script>alert('hi');</script>
Upvotes: 2