Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Nice try, but no, that's a broken old trick. window.status is gone for exactly this reason, but things like onclick="this.href=http://evilsite.example/" (or even onclick="window.location=http://somewhereelse.evil.example/;return false") still work (link shows a benign location, but it's changed to a malicious one when you click).


sort by: page size:

<a href="http://www.fakehover.com onclick="window.location='http://www.goto.com/>; I presume.

There used to be a DOM attribute specifically for changing the window status text, which was the same area used to display a hovered link URL.[0]

[0] https://developer.mozilla.org/en-US/docs/DOM/window.status


The href attribute is still changed. While javascript can't change the status bar explicitly any more, they can set the link's href to the fake URL and change the link's target in the click event.

Demo: http://jsfiddle.net/zTRQh/


Doesn't work with event handlers: https://remove-js.com/http://14.rs

wayback machine for current url:

javascript:window.location='https://web.archive.org/web/*/'+document.location



I still use Knockout[0] for almost an identical experience.

0: https://knockoutjs.com/


This is a case of Something.js if I've ever seen one:

http://www.developingandstuff.com/2015/03/somethingjs.html


OT note: sel.onclick=e=>{} works just fine. https://jsfiddle.net/39h5ynga/

That code doesn't work (at least in ordinary page scripts), as far as I can tell.

http://jsfiddle.net/vej6vbdt/


The page: https://www.virustotal.com/old-browsers/

It doesn't work without Javascript.



I use A without href only when I'm making an actual anchor A name. When I use href=#, I always have javascript onclick return false. This won't stop crawlers but it keeps the user's history and address bar clean.

Here is a little snippet you can add as a bookmark to load the current page you are viewing with remove-js.com

javascript:window.location.href='http://remove-js.com/'+window.location.href


Since I know I'll forget this in 10 minutes... I threw together this bookmarklet to use it as needed.

javascript:void%20function(){location.href=%22http://12ft.io/%22+window.location.href}();


Interesting. I just happen to have this tab open: http://exploringjs.com/es6/ch_callables.html.

Here is my implementation from 2014 (with jquery...). Watch out. It has lots of bugs!

http://www.ronilan.com/bugsweeper/


http://jquery.com seems to be working fine by the way.

I particularly enjoy how going to http://javascript.crockford.com/ doesn't load any javascript.
next

Legal | privacy