How can I remove items from right-click context menu?

Discussion of features in Mozilla Firefox
Locked
hwy101
Posts: 97
Joined: February 29th, 2004, 6:42 pm

Post by hwy101 »

Wondering, is this the way to add Right-Click-Copy Text Back into Right-Click?
(not to mention, why did it disappear) Thanks
Hwy-101
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Here is a list of IDs: http://kb.mozillazine.org/Chrome_element_names_and_IDs

[q]: "Wondering, is this the way to add Right-Click-Copy Text Back into Right-Click?
(not to mention, why did it disappear) Thanks"

The Copy item should be there in the context menu if you select some text or Copy is otherwise useable in that context: #context-copy {display: -moz-box !important;}

You can check if you have a userChrome.css file that removes it.
You can start Firefox in -safe-mode to test if it is removed by an extension (or theme).
remieres
Posts: 8
Joined: June 4th, 2007, 12:49 am

Post by remieres »

I cant seam to get rid of Send Image... Context. because when im in a site with lots of good pictures and I frustrate myself with hitting this command next to Save image As I get frustrated when I have to wait for my email proggy to start.

I've tried entering #context-sendimage, /* "Send Image..." */ and nothing works

even did the whole

/* =============== Remove Items In Context Menu: IMAGES
*/#context-sendimage,
/* "Send Image..."

and still nothing I've tried a bunch of different suggestions from this discussion and still nothing. am I doing something wrong?
Joe g Russell
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

This code should remove that context menu entry:

Code: Select all

#context-sendimage {display: none !important;}
If that doesn't work then check that you put the code in the correct file (userChrome.css) and in the correct folder (chrome folder).

See: Where is my profile folder? (KB)
remieres
Posts: 8
Joined: June 4th, 2007, 12:49 am

Post by remieres »

I found the userchrome.css file in C:\Program Files\Mozilla Firefox\defaults\profile\chrome I changed it from the userchrome-example.css

I tried inputting the #context-sendimage {display: none !important;} at the end so now it reads

* display: none !important;
* }
*/

/*
* For more examples see http://www.mozilla.org/unix/customizing.html
*/
#context-sendimage {display: none !important;}
Joe g Russell
remieres
Posts: 8
Joined: June 4th, 2007, 12:49 am

Post by remieres »

still it doesnt work oh well I'll probably just have to put up with it
Joe g Russell
User avatar
Soul Stealer
Posts: 480
Joined: March 31st, 2007, 1:18 pm
Location: God's Country

Post by Soul Stealer »

Check the name of your file. It's supposed to be:

userChrome.css (notice the capital 'C')

At the top you'll see:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

Below that, put EXACTLY what dickvl posted:

#context-sendimage {display: none !important;}


It should work fine. It did for me. :)
It's like I said.
Jenita
Posts: 3
Joined: June 5th, 2007, 3:32 am

Post by Jenita »

1.Click Start
2. Click Run
3. Type in regedit and click ENTER
4. Browse to the following:
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers

(This is where programs attach to the right click menu.)

5. You simply delete or export then delete the keys you do not want.
[url=http:/www.refinance-autoloans.info/used_car_loan.php]Used Car Loan[/url] | [url=http:/www.e-carloans.info/bad_credit_carloan.php]Bad Credit Car Loan[/url] | [url=http:/www.carloansinsurance.info/affordable_car_insurance.php]Affordable Car Insurance[/url]
User avatar
Soul Stealer
Posts: 480
Joined: March 31st, 2007, 1:18 pm
Location: God's Country

Post by Soul Stealer »

Some folks don't like messing with the registry directly and these aren't where you say they are anyway.
It's like I said.
remieres
Posts: 8
Joined: June 4th, 2007, 12:49 am

Post by remieres »

so the userchrome.css file is case sensitive? wow i didnt know I'll check. and I went to the location in regedit. and the key does not exist nothing says mozilla. and in the keys that are there they are all (Default) nothing specific like commands.
Joe g Russell
remieres
Posts: 8
Joined: June 4th, 2007, 12:49 am

Post by remieres »

k the file was userChrome.css and I found the

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

and right below it no space is already /* set default namespace to XUL */ so I put the new command between the http://www and the set default lines. and nothing changed. and yes all along im saving and closing both the notepad and firefox when I make my changes.

then I tried putting the (Set Default) line back where it was and put the new command right after and still nothing. maybe its just the new firefox.

maybe if I just got one of you guys to send me your working userChrome.css file??
Joe g Russell
User avatar
Soul Stealer
Posts: 480
Joined: March 31st, 2007, 1:18 pm
Location: God's Country

Post by Soul Stealer »

Your current userChrome.css file should read this:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#context-sendimage {display: none !important;}

After making sure you save the file as userChrome.css (make sure the extension is .css and not .txt), reboot FF and it should work. I'd send you mine but it reads exactly what I just posted.
It's like I said.
User avatar
James
Moderator
Posts: 28005
Joined: June 18th, 2003, 3:07 pm
Location: Made in Canada

Post by James »

remieres wrote:I found the userchrome.css file in C:\Program Files\Mozilla Firefox\defaults\profile\chrome I changed it from the userchrome-example.css

Wrong place as it should be in your Profile folder not the program folder, so if your putting the userChrome.css there then no wonder it is not working.

dickvl linked to a article on where your profile is located http://kb.mozillazine.org/Profile_folde ... _folder.3F earlier before you posted finding it C:\Program Files\Mozilla Firefox\...

dickvl wrote:If that doesn't work then check that you put the code in the correct file (userChrome.css) and in the correct folder (chrome folder).

See: Where is my profile folder? (KB)


The underlined words in the quote are links.
User avatar
dickvl
Posts: 54161
Joined: July 18th, 2005, 3:25 am

Post by dickvl »

Text in userChrome.css between /* and */ is comment and thus ignored.
Make sure that the /* and */ are matched and that you are not accidentally skipping rules.
Runningflame570
Posts: 5
Joined: April 22nd, 2007, 10:44 pm

Post by Runningflame570 »

More simply than all of those the Menu Editor extension allows you to hide any item within the different menus (context and otherwise) in Firefox.
Locked