[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 243524352435.png (55 KB, 797x746)
55 KB
55 KB PNG
I want to disable the right click context menu for Libchess so I can draw colored arrows without the menu getting in the way. The website uses right click for red, blue, and orange arrows. I've tried disabling dom.event.contextmenu.enabled in the about:config to no avail. Setting a userChrome script doesn't seem to work either. Although, I'm not able to confirm if the script is running or or not. I believe I set the proper config setting, toolkit.legacyUserProfileCustomizations.stylesheets, to true for utilizing a chrome user script . I'm not fully familiar with using the about:config nor with user scripts, so this could be an issue on my part. Any help would be appreciated. I'm using the latest version of Firefox nightly.
>>
there are websites that override the right click behaviour to provide a popup menu (this is enough of a problem that there's an ext called absolute enable right click). Maybe you can just figure out how those websites do it inject that code into the website
>>
>>107501664
I remember reading somewhere that some people reverse their right-click and middle mouse button functionality. But I don't remember how though, and I don't know if it will actually solve the issue or just make right-click completely useless on that site. Still, it's something to look into.
>>
Install ViolentMonkey and ask ChatGPT to write you a userscript.
>>
>>107501664
The site should do that for you.
>>
>>107501664
In about:config
change dom.event.contextmenu.enabled to false
Enjoy. 4chan is dead.
>>
>>107504986
Didn't OP say he already tried that?

>I've tried disabling dom.event.contextmenu.enabled in the about:config to no avail.
>>
File: 1765394439332516299.png (13 KB, 299x113)
13 KB
13 KB PNG
>>107501664
werks on my machine. try an actual release, shit is going to break often on nightly builds. alternatively try disabling all your extensions one by one until it works.
>>
I would personally just use a grease monkey script. Something like this on the webpage or on the specific element you want disabled.
document.oncontextmenu = document.body.oncontextmenu = function() {return false;}
>>
>>107501664
press shift and right click
>>
>>107501664

// ==UserScript==
// @name Disable Lichess Right-Click Menu
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Disable right-click context menu on Lichess
// @author You
// @match https://lichess.org/*
// @match https://*.lichess.org/*
// @grant none
// @run-at document-start
// ==/UserScript==

(function() {
'use strict';

document.addEventListener('contextmenu', function(e) {
e.preventDefault();
e.stopPropagation();
return false;
}, true);
})();
>>
>>107501664
ublock origin is removing the code that removes the right click.
>>
idk probably somewhere in about:config



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.