I use a bookmarklet. It can be something basic, such as: javascript:void(document.oncontextmenu=document.onMouseDown=()=>true) ...which works for, maybe, 60% of cases. Or you can try a more sophisticated one for greater success. e.g.: javascript:(function(w){ var arr = ['contextmenu','copy','cut','paste']; for(var i = 0, x; x = arr[i]; i++){ if(w['on' + x])w['on' + x] = null; w.addEventListener(x, function(e){e.stopP…
Ask HN: How to disable right-click blocking in the browser
61–66 of 66 posts
Re: Ask HN: How to disable right-click blocking in the browser
#62Earlier quoted context omitted.
The downside here is that there are still plenty of legitimate uses for capturing right-click, and this fix will impede operation of those. I'd go with a bookmarklet style approach suggested by other top-level comments.
What are these valid use cases?
Re: Ask HN: How to disable right-click blocking in the browser
#63I use a great Google Chrome extension called Allow Right Click that defeats that. Preventing right click is almost as asinine as preventing copying.
Code is also on github if you want to learn from it: https://github.com/lunu-bounir/allow-right-click
if you go back to the first few commits you see it started similar to some of the small JS snippets people have suggested here. It is interesting to see how it has evolved
Re: Ask HN: How to disable right-click blocking in the browser
#64I use a bookmarklet. It can be something basic, such as: javascript:void(document.oncontextmenu=document.onMouseDown=()=>true) ...which works for, maybe, 60% of cases. Or you can try a more sophisticated one for greater success. e.g.: javascript:(function(w){ var arr = ['contextmenu','copy','cut','paste']; for(var i = 0, x; x = arr[i]; i++){ if(w['on' + x])w['on' + x] = null; w.addEventListener(x, function(e){e.stopP…
Try making it immutable object
Re: Ask HN: How to disable right-click blocking in the browser
#65Earlier quoted context omitted.
Just playing Devil’s Advocate. This is your thoughts right now. If a real tangible offer came through for 10s of millions of dollars, would you still feel that way? What about when you die or become permanently offline for some other reason? Will your family sell it to the lowest bidder, delist it, or just leave it to bit rot? These are things everyone has to/should consider when granting software unfettered access t…
> Just playing Devil’s Advocate. You could just ask me questions without associating yourself with Satan. ;-) > If a real tangible offer came through for 10s of millions of dollars, would you still feel that way? I would definitely sell for 10s of millions of dollars! Indeed, I would sell for 1 million dollars. But nobody is going to offer me that LOL. > Will your family sell it to the lowest bidder, delist it, or ju…
Well, assuming they can transfer money out of people's accounts and get away with it, which obviously requires additional effort.
Re: Ask HN: How to disable right-click blocking in the browser
#66Earlier quoted context omitted.
> Just playing Devil’s Advocate. You could just ask me questions without associating yourself with Satan. ;-) > If a real tangible offer came through for 10s of millions of dollars, would you still feel that way? I would definitely sell for 10s of millions of dollars! Indeed, I would sell for 1 million dollars. But nobody is going to offer me that LOL. > Will your family sell it to the lowest bidder, delist it, or ju…
Presumably if lots of people trust your extension with access to their banking website, a nefarious actor could make steal more money to make that price worthwhile. Well, assuming they can transfer money out of people's accounts and get away with it, which obviously requires additional effort.
I would sell to [known BigCo] for a million dollars. But BigCos aren't interested in my software, so that's a non-issue.
If a criminal offered me millions of dollars, I would report them to the FBI. And I think this whole discussion is just ultra-paranoia.
withinboredom claims but refuses to name a supposed malware extension with millions of users. Not sure I believe this astounding story.
I don't even aspire to be rich, or even to retire. That sounds pretty boring to me. I'd rather work on something socially useful. But financial security would be nice.