Enable right click?

Ask for help about NoScript, no registration needed to post
harryray2

Enable right click?

Post by harryray2 »

Is there any way, with noscript, to enable right click on sites that have restricted it...For example pictures on facebook my 2search google images2 and save picture as" is disabled.

Thanks.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

Should be possible to make surrogate script for that, but I'm not quite sure what JS.

Why with NoScript? Does it work to just set about:config > dom.event.contextmenu.enabled to false ?
*Always* check the changelogs BEFORE updating that important software!
-
harryray2

Re: Enable right click?

Post by harryray2 »

No, tried that, doesn't work....
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

Try this code (from http://lexi.ucoz.ru/buttons.html#firefox, thanks fatboy for converting to surrogate).

go to about:config
right-click > new > string
name:

Code: Select all

noscript.surrogate.restore_contextmenu.replacement
value:

Code: Select all

(function(w){var arr = ['contextmenu','copy','cut','paste','mousedown','mouseup','beforeunload','beforeprint']; for(var i = 0, x; x = arr[i]; i++){if(w['on' + x])w['on' + x] = null; w.addEventListener(x, function(e){e.stopPropagation()}, true);}; for(var j = 0, f; f = w.frames[j]; j++){try{arguments.callee(f)}catch(e){}}})(content);
right-click > new > string
name:

Code: Select all

noscript.surrogate.restore_contextmenu.sources
value is "@" followed by the list of sites where you want your context menu back, written in ABE syntax. See ABE Rules .pdf for details.
Example:

Code: Select all

@.google.com .facebook.com
*Always* check the changelogs BEFORE updating that important software!
-
harryray2

Re: Enable right click?

Post by harryray2 »

Just realised, one of the problems is that noscript has to be disabled as it appears that facebook wont run without Java!!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
harryray2

Re: Enable right click?

Post by harryray2 »

Tried it, didn't work....If, on firefox, I switch from basic page style to no style, right click then works on the pictures.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

Do you use Stylish?
*Always* check the changelogs BEFORE updating that important software!
-
harryray2

Re: Enable right click?

Post by harryray2 »

No, I just used option in the Firefox view menu
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

Please try this -

1) Install Stylish from the above link
2) Go to the problemstic site
3) Stylish button > Write new style. Select the option immediately above "Blank style".
4) inside the @-moz-document block, paste this -

Code: Select all

  * { pointer-events: auto !important; }
5) Click Preview and check if right-click now works.

If still no dice, please provide an exact URL to a problematic google images search page, and explain which image(s) cannot be right-clicked.
*Always* check the changelogs BEFORE updating that important software!
-
harryray2

Re: Enable right click?

Post by harryray2 »

Below is what comes up in stylish....Where do I insert * { pointer-events: auto !important; } ?

Code: Select all

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("facebook.com") {

}
The problem I'm having on sites like Facebook, Tumblr etc is that when I right click on any of the images (in Facebook, the images on the timeline) options are missing such as 'search image by Google' (which is an addon) and 'save image as' etc.
Last edited by barbaz on Tue Dec 27, 2016 6:39 pm, edited 1 time in total.
Reason: wrap CSS code in code tags
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

Code: Select all

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("facebook.com") {
  * { pointer-events: auto !important; }
}
*Always* check the changelogs BEFORE updating that important software!
-
harryray2

Re: Enable right click?

Post by harryray2 »

Thanks, but that didn't work either...
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: Enable right click?

Post by barbaz »

So can you please post the URL to a page where you see this problem?

If it's only on facebook and these social network type sites, I won't be able to help more as they're all blocked here. Someone else might be able to though.
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply