Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Suggestion] Dont F With Right-Clicks #129

Open
alkaris2 opened this issue Sep 17, 2023 · 4 comments
Open

[Feature Suggestion] Dont F With Right-Clicks #129

alkaris2 opened this issue Sep 17, 2023 · 4 comments

Comments

@alkaris2
Copy link

I know this extension deals with not being able to paste on web forms and such, but there are also the few odd sites where they will unnecessarily block you from right-clicking on pages. Despite how minor this is, I believe having access blocked to context menus is completely useless and adds nothing in terms of securing content served on the page despite being able to open the Inspector Console and view the contents.

This is what some bad actors will typically use to block context menu access;

window.oncontextmenu = function() { return false; }
	$('body').bind('contextmenu', function(e) {
		return false;
	});
 
$(document).ready(function () {
	$('.select2').select2();
});
@jswanner
Copy link
Owner

@alkaris2, this is not an unreasonable request. I'm still debating with myself whether it seems like an appropriate fit or not...

@timmc
Copy link

timmc commented Mar 8, 2024

In the meantime, it's worth noting that in Firefox you can hold down shift while right-clicking to always get the context menu. (Not sure what's available in other browsers.)

@Hobadee
Copy link

Hobadee commented Aug 9, 2024

@jswanner Easy UI/UX solution would be, for each regex item, add a checkbox for what you want blocked/unblocked, then the user can decide if they want just paste restored, or context menu, or whatever else you may add in the future.

UI would look like (In shitty ASCII-art):

Add/edit patterns used to activate this extension:
_____________________________________________ Un-Fuck: [X] Paste [X] Context
( Add Pattern )

Haven't checked your code yet, but data structure may need to be changed slightly to accommodate additional types, but this sort of UI/UX would be clean and easy for users.

@jswanner
Copy link
Owner

jswanner commented Aug 9, 2024

It's certainly possible to do this with a bookmarket:

javascript:document.addEventListener("contextmenu",(e)=>{e.stopImmediatePropagation();return true;},true);

https://github.com/jswanner/DontF-WithPaste?tab=readme-ov-file#bookmarklet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants