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

Discussion of features in Mozilla Firefox
Locked
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

mai9 - just wanted to say that you live in one of the most beautiful cities in the world... I spent a couple of weeks there last year and I fell in love with it.
User avatar
mai9
Posts: 1619
Joined: January 15th, 2003, 3:41 pm
Location: Barcelona
Contact:

Post by mai9 »

wig_out_on_me wrote:mai9 - just wanted to say that you live in one of the most beautiful cities in the world... I spent a couple of weeks there last year and I fell in love with it.

ooops, thanks :) I like it aswell, well I only lived here my whole live, so I can't really compare, but thanks for your comment, I'll try to use FF less and walk more ;)

I am not sure if it's wise to post it, but here's a photo I made from my bedroom window :)
Clint1
Posts: 177
Joined: October 15th, 2004, 6:19 am
Location: Baton Rouge, LA USA

Post by Clint1 »

Ok, I understand about the comma. But what I said still holds true, you can't enable "Properties". The only way is to completely remove the line like I indicated. I tried removing the comma from "view info" after "Properties" is enabled, same thing. If you can right click a webpage and see "Properties", then please post that specific area of your userChrome file.
Thanks.
God Bless,
-Clint
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

Clint1 - yes, that is true as far as it relates to this thread in regards to only being able to remove menu items via userChrome.css and hence the name of the thread and mai9 stating earlier:
mai9 wrote:no no no. This particular thread will answer how to *remove* menuitems, not how to add them.

1, 2 and 3 involve some coding.

You can ask the developer of Menu Editor if he wants to add this features.
I also remember seeing broken css formatting rules in your userChrome.css in a previous post of yours similar to the one in regards to the additional comma. As I recall, you had two comment start tags followed by one comment close tag... there are numerous tutorials regarding the proper formatting of css including ones regarding properly formatting commas in relation to multiple css name selectors (I believe that is a correct term for it but it may very well not be) as was incorrect in this instance. Considerring these mistakes, it doesn't surprise me when you post about items missing from your context menu and other problems you have had.


mai9 - I've been to Europe twice... the first time for two and a half months the second time for a little over a month... I've spent time in several of the major cities and I took far more photographs of Barcelona than any other city... thank you very much for sharing the photograph - it does bring back the memories.
Clint1
Posts: 177
Joined: October 15th, 2004, 6:19 am
Location: Baton Rouge, LA USA

Post by Clint1 »

wig_out_on_me wrote:Clint1 - yes, that is true in regards to only being able to remove menu items via userChrome.css and hence the name of the thread and mai9 stating earlier:
mai9 wrote:no no no. This particular thread will answer how to *remove* menuitems, not how to add them.

1, 2 and 3 involve some coding.

You can ask the developer of Menu Editor if he wants to add this features.
I also remember seeing broken css formatting rules in your userChrome.css in a previous post of yours similar to the one in regards to the additional comma. As I recall, you had two comment start tags followed by one comment close tag... there are numerous tutorials regarding the proper formatting of css including ones regarding properly formatting commas in relation to multiple css name selectors (I believe that is a correct term for it but it may very well not be) as was incorrect in this instance. Considerring these mistakes, it doesn't surprise me when you post about items missing from your context menu and other problems you have had.


mai9 - I've been to Europe twice... the first time for two and a half months the second time for a little over a month... I've spent time in several of the major cities and I took far more photographs of Barcelona than any other city... thank you very much for sharing the photograph - it does bring back the memories.

What confuses me, is you say you can "only remove" items using that css file. Ok, so why is it you can enable them (same as "adding") by commenting the line with /*?

I never posted anything from my userChrome css file, that was from the example on page 1 of this thread (and I used it). So please point out the coding error. ;)

I thought I indicated before that I started all over again. I installed v.9.3 on my main PC, and started a new Profile on my test PC (of 1.0PR), and in both cases I never had any right click and "properties" for a webpage. And on the .9.3 install I never had any right click and "select all" for a webpage (but I do have it for text in forms, and I only have it on a webpage if I highlight some portion of text on a webpage then right click). So, is that normal for v.9.3? This is before I did any tweaks/changes/userChrome edits or added any extensions. I remember you or someone saying that the right click and "view page info" is the same as "properties", but some are telling me that they have the right click and "properties", so I'd like to know how.

Can anyone tell me please how to remove what I mentioned earlier (the "print preview" and "print" now showing on the context menu EVERYWHERE).
Thanks.

That is a beautiful photo. Is that from a digicam or 35mm?
God Bless,
-Clint
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

Clint1 wrote:What confuses me, is you say you can "only remove" items using that css file. Ok, so why is it you can enable them (same as "adding") by commenting the line with /*?
I have never said any such thing. *edited to add* to avoid future confusion regarding this just take the comment I quoted from mai9 as to what can be done... yes, there are rare exceptions but not in relation to what you are trying to accomplish and it would take some time to explain it with no value in return. What I did say was
wig_out_on_me wrote:yes, that is true as far as it relates to this thread in regards to only being able to remove menu items via userChrome.css
*end edit*

Clint1 wrote:I never posted anything from my userChrome css file, that was from the example on page 1 of this thread (and I used it). So please point out the coding error. ;)
Ummm... actually you did here in the <a href="http://forums.mozillazine.org/viewtopic.php?t=60855&postdays=0&postorder=asc&postsperpage=15&start=45">Get File Size Extension</a> thread... it may have been from some other example but it appears that you had modified it and when doing so messed up the formatting. I also pointed out the mistake in that thread and you responded to it as well quoting my original comment.

As for the remainder all I can say is as I said previously. You have posted incorrectly formatted code twice now and it doesn't surprise me that you are having issues with your context menu and quite possibly elsewhere due to this. I believe what is causing your problems are the modifications you have been making and the couple of times I have seen these modifications (only small portions of these modifications actually) there have been significant mistakes.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

Clint1 - as a suggestion perhaps just post a simple list of the items you would like to have removed from a standard context menu (e.g. the names and in some cases the part of a web page where you bring up the context menu since they can be different) and perhaps someone can provide the css to place in you userChrome.css with no other css in your userCrhome.css. This will remove any of the potential conflicts due to other modifications that have been made and achieve your goal. To see the standard context menu just rename your userChrome.css to something else and restart firefox. If you have any extensions for modifying the context menu it would probably be best if you either removed the modifications, disabled it, or removed it first as well.
Clint1
Posts: 177
Joined: October 15th, 2004, 6:19 am
Location: Baton Rouge, LA USA

Post by Clint1 »

Ok, I'll give up on descriptions of the css file and what can be done with it. ;) I call it "adding something" when the right click menu will not have an item, then you can go into the userChrome file and comment the tag to enable it, then you do have it in the right click menu. To me, that's "adding an item", if that's an erroneous description then I apologize.

On the other thread you spoke of when I mentioned: I even added a /* #context-metadata /* "Properties" */ to the "IMAGES" area of the userChrome.css file and that did nothing... (if that's to what you are referring), yes, that line was from the CSS example on page 1, and in that specific case, like I said I tried adding it to another area of the css file (and tried adding/removing the comma, etc), then put it all back to default when it didn't work. Yes, that's in the past now, that's been fixed.....but I don't remember how! ;)

I think maybe you missed this part:
I thought I indicated before that I started all over again. I installed v.9.3 on my main PC, and started a new Profile on my test PC (of 1.0PR), and in both cases I never had any right click and "properties" for a webpage. And on the .9.3 install I never had any right click and "select all" for a webpage (but I do have it for text in forms, and I only have it on a webpage if I highlight some portion of text on a webpage then right click). So, is that normal for v.9.3? This is before I did any tweaks/changes/userChrome edits or added any extensions. I remember you or someone saying that the right click and "view page info" is the same as "properties", but some are telling me that they have the right click and "properties", so I'd like to know how.

Can anyone tell me please how to remove what I mentioned earlier (the "print preview" and "print" now showing on the context menu EVERYWHERE).


As for the 2nd paragraph, obviously that was something I did (but I'd still like to know how to remove it without uninstalling all my extensions one-by-one to find the culprit).

As for the 1st paragraph......the right click and "properties" is now a non-issue since someone else just told me they don't have it either for a webpage (and I assume you don't as well?). So, this leaves the right click and "select all" not being there on the .9.3 install, and like I indicated this is before any mod's were done to anything. If this is normal behavior for .9.3, then that issue would also be closed. This would then only leave the full screen problem (no taskbar in full screen mode).
Thanks.
God Bless,
-Clint
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

No, I didn't miss that part. I realize you started a new profile and if you recall that was one of several possible ways that I recommended to try to fix the problems you were experiencing previously. What I was pointing out was what I have been trying to convey... that you had incorrect css formatting and that incorrect css formatting can cause some of the problems you have posted about. Nothing more and nothing less.

As for uninstallng all of your extensions I wasn't suggesting that. What I stated was
wig_out_on_me wrote:To see the standard context menu just rename your userChrome.css to something else and restart firefox. If you have any extensions for modifying the context menu it would probably be best if you either removed the modifications, disabled it, or removed it first as well.
I specifically used the word for in the previous paragraph to try to convey that if you have any extensions that is meant for customizing the context menu you should disable, reset, or uninstall it so as to avoid conflicts with what ever someone was trying to help you with so as to make it easier for the person trying to help you.

As for right click properties, I mentioned a while back in another thread to you that the equivalent is available in the Tools menu and it is named Page Info and you responded with it is also in the context menu as View Page Info... perhaps you don't recall this as well... if you want me to go searching for it I can probably find it but I would prefer to not do this. Perhaps you are referring to image properties but I thought that was resolved in the other thread I referenced.

As for Select All... like I have said previously... it has always been there for me without an extension providing it and as to what specifically is different with your system I am unable to say.

*edited to add* I can kind of see the direction you are coming from regarding enabling and disabling... though everyone I have ever spoken to regarding the userChrome use the terms commenting out to refer to what you have termed as disabling. Also, your comment was incorrectly formatted in the first place so it may have done other things besides just commenting it out or disabling it as you would put it. Just so you know... a comment is as follows:
/* this is a proper comment */
It should not be
/* this is an /* improper comment */
You could fix the improper one in several ways
/* this is a */ /* proper comment though it is rather silly */
/* this is a proper comment and well formatted */

*2nd edit* come to think of it... you never showed the code that followed the first part you tried to disable and that also needs to be commented out like so

Code: Select all

/* Open Link in New Window */
#context-openlink {
 display: none !important;   
}
could be commented out as follows:

Code: Select all

/* Open Link in New Window */
/* #context-openlink {
 display: none !important;   
} */

as long as there are no comments in between the comment start and the comment end you are adding.
Clint1
Posts: 177
Joined: October 15th, 2004, 6:19 am
Location: Baton Rouge, LA USA

Post by Clint1 »

wig_out_on_me wrote:No, I didn't miss that part. I realize you started a new profile and if you recall that was one of several possible ways that I recommended to try to fix the problems you were experiencing previously. What I was pointing out was what I have been trying to convey... that you had incorrect css formatting and that incorrect css formatting can cause some of the problems you have posted about. Nothing more and nothing less.

So, you're saying that I could have bad css formatting BEFORE even installing the userChrome.css file or anything else having to do with it? This is what I'm trying to say; I had missing features immediately after installs, before I did ANYTHING.

As for uninstallng all of your extensions I wasn't suggesting that. What I stated was
wig_out_on_me wrote:To see the standard context menu just rename your userChrome.css to something else and restart firefox. If you have any extensions for modifying the context menu it would probably be best if you either removed the modifications, disabled it, or removed it first as well.
I specifically used the word for in the previous paragraph to try to convey that if you have any extensions that is meant for customizing the context menu you should disable, reset, or uninstall it so as to avoid conflicts with what ever someone was trying to help you with so as to make it easier for the person trying to help you.

Yeah, and creating a new Profile or starting FF in safe mode does the same thing, right? With either you have no extensions or mod's done.

As for right click properties, I mentioned a while back in another thread to you that the equivalent is available in the Tools menu and it is named Page Info and you responded with it is also in the context menu as View Page Info... perhaps you don't recall this as well... if you want me to go searching for it I can probably find it but I would prefer to not do this. Perhaps you are referring to image properties but I thought that was resolved in the other thread I referenced.

Yes, I mentioned they were BOTH resolved. I also mentioned in my last post about the "properties" Vs. "view page info" bit: I remember you or someone saying that the right click and "view page info" is the same as "properties", but some are telling me that they have the right click and "properties", so I'd like to know how. So, I didn't miss it, I think you missed that I was aware of that. ;)

As for Select All... like I have said previously... it has always been there for me without an extension providing it and as to what specifically is different with your system I am unable to say.

Me too. ](*,)

*edited to add* I can kind of see the direction you are coming from regarding enabling and disabling... though everyone I have ever spoken to regarding the userChrome use the terms commenting out to refer to what you have termed as disabling.

I guess "half dozen of one" and "six of the other".

Also, your comment was incorrectly formatted in the first place so it may have done other things besides just commenting it out or disabling it as you would put it. Just so you know... a comment is as follows:
/* this is a proper comment */
It should not be
/* this is an /* improper comment */
You could fix the improper one in several ways
/* this is a */ /* proper comment though it is rather silly */
/* this is a proper comment and well formatted */

*2nd edit* come to think of it... you never showed the code that followed the first part you tried to disable and that also needs to be commented out like so

Code: Select all

/* Open Link in New Window */
#context-openlink {
 display: none !important;   
}
could be commented out as follows:

Code: Select all

/* Open Link in New Window */
/* #context-openlink {
 display: none !important;   
} */

as long as there are no comments in between the comment start and the comment end you are adding.

Thanks for the info on proper css coding. Like I mentioned, it wasn't my comment. ;) I got all the comments from the css file on the bottom of page 1, so someone needs to correct that I guess if it's incorrect. This is how the specific area reads:

Code: Select all

/* =============== Remove Items In Context Menu: EXTRA */ 
#frame-sep, /* Separator Above "This Frame" */
/* #frame, /* "This Frame" */
/* #context-viewpartialsource-mathml, /* "View MathML Source" */
#context-sep-properties, /* Separator Above Properties Items */
/* #context-viewsource, /* "View Page Source" */
#context-viewinfo, /* "View Page Info" */
#context-metadata /* "Properties" */
{ display: none; !important; }

/* =============== Remove Items In Context Menu: BOOKMARKS */

...and in particular, this area within it: (hmm, code tag won't work now, so it's in plain text)

#context-viewinfo, /* "View Page Info" */
#context-metadata /* "Properties" */
{ display: none; !important; }

.....is what is in question. Doing any of the following, did not work:


#context-viewinfo, /* "View Page Info" */
/* #context-metadata /* "Properties" */
{ display: none; !important; }



#context-viewinfo, /* "View Page Info" */
/* #context-metadata, /* "Properties" */
{ display: none; !important; }



#context-viewinfo /* "View Page Info" */
/* #context-metadata, /* "Properties" */
{ display: none; !important; }


..and all variations of the above with the { display: none; !important; } line removed:

#context-viewinfo, /* "View Page Info" */
/* #context-metadata /* "Properties" */

....etc.

Now, if the "Viewinfo" line above "Properties" is commented IN, then how would that change the commenting in of "properties"? Perhaps I should also ask, just what is this area of "Properties" FOR in the first place? It's obviously not for a blank area of a webpage since we've determined that "view page info" is for that. So, the presence of BOTH of them in that CSS example is rather confusing to me.
Thank you again.
God Bless,
-Clint
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

I only read the first part and I've got to go take care of some other things... what I said was
wig_out_on_me wrote:No, I didn't miss that part. I realize you started a new profile and if you recall that was one of several possible ways that I recommended to try to fix the problems you were experiencing previously. What I was pointing out was what I have been trying to convey... that you had incorrect css formatting and that incorrect css formatting can cause some of the problems you have posted about. Nothing more and nothing less.
Specifically, What I was pointing out was what I have been trying to convey... that you had incorrect css formatting and that incorrect css formatting can cause some of the problems you have posted about. Nothing more and nothing less. I was referring to the two times you posted code snippets and in both of those posts you had incorrect css formatting! Hopefully someone else will be able to help you out... I need to take care of some other things.
User avatar
guiro_boy
Posts: 21
Joined: September 30th, 2004, 2:53 am
Location: Columbus, OH, USA

Post by guiro_boy »

Clint wrote:Ok, I'll give up on descriptions of the css file and what can be done with it. Wink I call it "adding something" when the right click menu will not have an item, then you can go into the userChrome file and comment the tag to enable it, then you do have it in the right click menu. To me, that's "adding an item", if that's an erroneous description then I apologize.


What a semantic mess. I think the point was that you can't use these settings to add options that the Firefox context menus didn't originally contain. The example userChrome configs that people have been posting show how to remove the various default items from the context menu. By commenting out the lines that remove the default items, you are able to restore them to the menu -- i.e. the same effect you could achieve by not including the lines to remove them in the first place. This isn't the same thing as adding a new item which wasn't originally present in Firefox's default context menus, which is what people are trying to explain isn't possible (except through extensions).

I hope that makes sense (and that my understanding of this is correct).

Actually, the one thing that I'd actually like to see added to the context menus is an option to switch encodings, which is in the context menus in IE. I browse Japanese sites often and it's useful to have this option close at hand for the rare occasions when the encoding type isn't autodetected properly.
Last edited by guiro_boy on October 20th, 2004, 12:35 pm, edited 1 time in total.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

guiro_boy - <a href="http://www.extensionsmirror.nl/index.php?showtopic=1238">Right Encoding</a> adds character encoding to the context menu.
User avatar
guiro_boy
Posts: 21
Joined: September 30th, 2004, 2:53 am
Location: Columbus, OH, USA

Post by guiro_boy »

wig_out_on_me - Somehow I managed to not notice this extension. Thanks for pointing it out to me.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

Clint1 - a quick reply prior to going to lunch... what guiro_boy stated is what others have stated as well... I hope this has cleared things up. In relation to my comment that you then related to your other comments regarding reinstalling and a new profile... my point is that my comment had absolutely nothing to do with you reinstalling and having a new profile... it had to do with exactly what I stated. The css formating was and appears to still be incorrect in your latest code snippets and this can cause problems. Take a look at the post I made that shows proper formatting of comments and compare it to your code snippets. I would highly suggest cleaning it up so that you have no comments inside your sections of code and at the very least formatted your comments so that for each comment start (e.g. /*) is followed by a comment end (e.g. */) without ANY comment starts or ends in between (e.g. only comment text without /* or */ in between). Also, as mai9 pointed out earlier regarding the extra comma... you still have straggling commas in your code snippets... perhaps those ones aren't being used by you anymore but if they are they probably won't work properly if at all. Best of luck

guiro_boy - you are very welcome
Locked