Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Firefox > Elimiate "send link" context menu entry in Firefox?

Reply
Thread Tools

Elimiate "send link" context menu entry in Firefox?

 
 
FoxWolfie Galen
Guest
Posts: n/a
 
      02-19-2005
On Fri, 18 Feb 2005 12:04:38 +0100, Roland <(E-Mail Removed)> wrote:

> >>>> /* Remove 'Send Link' from context menu*/
> >>>> menuitem#context-sendlink {
> >>>> display: none !important;
> >>>> }

> [Just to be sure: it's the 'Send Link' item in the context menu
> (right-click), not the item in the menubar File -> Send Link]


I got it to work now. I had to restart Windoze though. Just restarting
Firefox had no effect, which I can't understand. I also guessed at the ID
for "Send Image", and was able to kill that menuitem as well. I'll be
trying to kill the "Set As Wallpaper" next. BTW, I'm using FF1.0 under
Win98SE.
--
FoxWolfie
 
Reply With Quote
 
 
 
 
FoxWolfie Galen
Guest
Posts: n/a
 
      02-19-2005
On Fri, 18 Feb 2005 14:53:22 +0100, Roland <(E-Mail Removed)> wrote:

> In case you want to find the id of the menu item yourself, open the DOM
> inspector (Tools -> DOM inspector).


I assume that's added by an extension?
I don't have a DOM Inspector under Tools.
--
FoxWolfie
 
Reply With Quote
 
 
 
 
Leonidas Jones
Guest
Posts: n/a
 
      02-19-2005
FoxWolfie Galen wrote:
> On Fri, 18 Feb 2005 14:53:22 +0100, Roland <(E-Mail Removed)> wrote:
>
>
>>In case you want to find the id of the menu item yourself, open the DOM
>>inspector (Tools -> DOM inspector).

>
>
> I assume that's added by an extension?
> I don't have a DOM Inspector under Tools.


If you reinstall, select a Custom install, and choose Dom Inspector as
an option.

I suspect Roland may have been talking to me, as he know's I'll ahve the
Dom inspector.

Lee
 
Reply With Quote
 
FoxWolfie Galen
Guest
Posts: n/a
 
      02-19-2005
On Sat, 19 Feb 2005 05:15:14 GMT, Leonidas Jones <(E-Mail Removed)> wrote:

> If you reinstall, select a Custom install, and choose Dom Inspector as
> an option.


Thanks. I'm going to do that as soon as I backup my firefox prefs to
another location.
--
FoxWolfie
 
Reply With Quote
 
Roland
Guest
Posts: n/a
 
      02-19-2005
On 19-2-2005 6:01, FoxWolfie Galen wrote:
> On Fri, 18 Feb 2005 12:04:38 +0100, Roland <(E-Mail Removed)> wrote:
>
>
>>>>>>/* Remove 'Send Link' from context menu*/
>>>>>>menuitem#context-sendlink {
>>>>>> display: none !important;
>>>>>>}

>>
>>[Just to be sure: it's the 'Send Link' item in the context menu
>>(right-click), not the item in the menubar File -> Send Link]

>
>
> I got it to work now. I had to restart Windoze though. Just restarting
> Firefox had no effect, which I can't understand. I also guessed at the ID
> for "Send Image", and was able to kill that menuitem as well. I'll be
> trying to kill the "Set As Wallpaper" next. BTW, I'm using FF1.0 under
> Win98SE.


For "Set As Wallpaper" the id is "context-setWallpaper".

Here's a list of all(?) items of the context menu of *my FF1.0* on
Win2000 [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0]. It may be different for other versions or
on a different platform:

<menuitem id="context-openlink" label="Open Link in New Window"/>
<menuitem id="context-openlinkintab" label="Open Link in New Tab"/>
<menuseparator id="context-sep-open"/>
<menuitem id="context-bookmarklink" label="Bookmark This Link..."/>
<menuitem id="context-savelink" label="Save Link As..."/>
<menuitem id="context-sendlink" label="Send Link..."/>
<menuitem id="context-copyemail" label="Copy Email Address"/>
<menuitem id="context-copylink" label="Copy Link Location"/>
<menuseparator id="context-sep-copylink"/>
<menuitem id="context-viewimage" label="View Image"/>
<menuitem id="context-copyimage-contents" label="Copy Image"/>
<menuitem id="context-copyimage" label="Copy Image Location"/>
<menuseparator id="context-sep-copyimage"/>
<menuitem id="context-saveimage" label="Save Image As..."/>
<menuitem id="context-sendimage" label="Send Image..."/>
<menuitem id="context-setWallpaper" label="Set As Wallpaper..."/>
<menuitem id="context-blockimage" class="menuitem-iconic" />
<menuitem id="context-back" label="Back"/>
<menuitem id="context-forward" label="Forward"/>
<menuitem id="context-reload" label="Reload"/>
<menuitem id="context-stop" label="Stop"/>
<menuseparator id="context-sep-stop"/>
<menuitem id="context-bookmarkpage" label="Bookmark This Page..."/>
<menuitem id="context-savepage" label="Save Page As..."/>
<menuitem id="context-sendpage" label="Send Link..."/>
<menuseparator id="context-sep-viewbgimage"/>
<menuitem id="context-viewbgimage" label="View Background Image"/>
<menuitem id="context-undo" label="Undo"/>
<menuseparator id="context-sep-undo"/>
<menuitem id="context-cut" label="Cut"/>
<menuitem id="context-copy" label="Copy"/>
<menuitem id="context-paste" label="Paste"/>
<menuitem id="context-delete" label="Delete"/>
<menuseparator id="context-sep-paste"/>
<menuitem id="context-selectall" label="Select All"/>
<menuseparator id="context-sep-selectall"/>
<menuitem id="context-keywordfield" label="Add a Keyword for this
Search..."/>
<menuitem id="context-searchselect" />
<menuseparator id="frame-sep"/>
<menu id="frame" label="This Frame" accesskey="h">
<menupopup>
<menuitem label="Show Only This Frame"/>
<menuitem label="Open Frame in New Window"/>
<menuitem label="Open Frame in New Tab"/>
<menuseparator/>
<menuitem label="Reload Frame"/>
<menuseparator/>
<menuitem label="Bookmark This Frame..."/>
<menuitem label="Save Frame As..."/>
<menuseparator/>
<menuitem label="View Frame Source"/>
<menuitem label="View Frame Info"/>
</menupopup>
</menu>
<menuseparator id="context-sep-properties"/>
<menuitem id="context-viewpartialsource-selection" label="View
Selection Source"/>
<menuitem id="context-viewpartialsource-mathml" label="View MathML
Source"/>
<menuitem id="context-viewsource" label="View Page Source"/>
<menuitem id="context-viewinfo" label="View Page Info"/>
<menuitem id="context-metadata" label="Properties"/>
<menuseparator hidden="true" id="context-sep-bidi"/>
<menuitem hidden="true" id="context-bidi-text-direction-toggle"
label="Switch Text Direction"/>
<menuitem hidden="true" id="context-bidi-page-direction-toggle"
label="Switch Page Direction"/>
--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \

<popup id="contentAreaContextMenu"
onpopupshowing="if (event.target != this) return true; gContextMenu = new nsContextMenu( this ); return gContextMenu.shouldDisplay;" onpopuphiding="if (event.target == this) gContextMenu = null;">
<menuitem id="context-openlink" label="Open Link in New Window" accesskey="W" oncommand="gContextMenu.openLink();"/>
<menuitem id="context-openlinkintab" label="Open Link in New Tab"
accesskey="T" oncommand="gContextMenu.openLinkInTab();"/>
<menuseparator id="context-sep-open"/>
<menuitem id="context-bookmarklink" label="Bookmark This Link..."
accesskey="L" oncommand="BookmarksUtils.addBookmark(gContextMenu .linkURL(), gContextMenu.linkText());"/>
<menuitem id="context-savelink" label="Save Link As..." accesskey="k" oncommand="gContextMenu.saveLink();"/>
<menuitem id="context-sendlink" label="Send Link..." accesskey="d" oncommand="gContextMenu.sendLink();"/>
<menuitem id="context-copyemail" label="Copy Email Address" accesskey="E" oncommand="gContextMenu.copyEmail();"/>
<menuitem id="context-copylink" label="Copy Link Location" accesskey="C" command="cmd_copyLink"/>
<menuseparator id="context-sep-copylink"/>
<menuitem id="context-viewimage" label="View Image" accesskey="I"
oncommand="gContextMenu.viewImage(event);" onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-copyimage-contents" label="Copy Image" accesskey="y" command="cmd_copyImageContents"/>
<menuitem id="context-copyimage" label="Copy Image Location" accesskey="o" command="cmd_copyImageLocation"/>
<menuseparator id="context-sep-copyimage"/>
<menuitem id="context-saveimage" label="Save Image As..." accesskey="v" oncommand="gContextMenu.saveImage();"/>
<menuitem id="context-sendimage" label="Send Image..." accesskey="n" oncommand="gContextMenu.sendImage();"/>
<menuitem id="context-setWallpaper" label="Set As Wallpaper..." accesskey="S" oncommand="gContextMenu.setWallpaper();"/>
<menuitem id="context-blockimage" class="menuitem-iconic" accesskey="g" oncommand="gContextMenu.toggleImageBlocking(this.g etAttribute('checked') != 'true');"/>
<menuitem id="context-back" label="Back" accesskey="B" command="Browser:Back"/>
<menuitem id="context-forward" label="Forward" accesskey="F" command="Browser:Forward"/>
<menuitem id="context-reload" label="Reload" accesskey="R" oncommand="BrowserReload();"/>
<menuitem id="context-stop" label="Stop" accesskey="S" command="Browser:Stop"/>
<menuseparator id="context-sep-stop"/>
<menuitem id="context-bookmarkpage" label="Bookmark This Page..."
accesskey="m" oncommand="addBookmarkAs(document.getElementById(' content'));"/>
<menuitem id="context-savepage" label="Save Page As..." accesskey="A" oncommand="saveDocument(window._content.document); "/>
<menuitem id="context-sendpage" label="Send Link..." accesskey="e" command="Browser:SendLink"/>
<menuseparator id="context-sep-viewbgimage"/>
<menuitem id="context-viewbgimage" label="View Background Image" accesskey="w"
oncommand="gContextMenu.viewBGImage(event);" onclick="checkForMiddleClick(this, event);"/>
<menuitem id="context-undo" label="Undo" accesskey="U" command="cmd_undo"/>
<menuseparator id="context-sep-undo"/>
<menuitem id="context-cut" label="Cut" accesskey="t" command="cmd_cut"/>
<menuitem id="context-copy" label="Copy" accesskey="C" command="cmd_copy"/>
<menuitem id="context-paste" label="Paste" accesskey="P" command="cmd_paste"/>
<menuitem id="context-delete" label="Delete" accesskey="D" command="cmd_delete"/>
<menuseparator id="context-sep-paste"/>
<menuitem id="context-selectall" label="Select All" accesskey="A" command="cmd_selectAll"/>
<menuseparator id="context-sep-selectall"/>
<menuitem id="context-keywordfield" label="Add a Keyword for this Search..."
accesskey="K" oncommand="AddKeywordForSearchField();"/>
<menuitem id="context-searchselect" accesskey="S" oncommand="OpenSearch('internet', gContextMenu.searchSelected(), true);"/>
<menuseparator id="frame-sep"/>
<menu id="frame" label="This Frame" accesskey="h">
<menupopup>
<menuitem label="Show Only This Frame" accesskey="w" oncommand="gContextMenu.showOnlyThisFrame();"/>
<menuitem label="Open Frame in New Window" accesskey="W" oncommand="gContextMenu.openFrame();"/>
<menuitem label="Open Frame in New Tab" accesskey="T" oncommand="gContextMenu.openFrameInTab();"/>
<menuseparator/>
<menuitem label="Reload Frame" accesskey="R" oncommand="gContextMenu.reloadFrame();"/>
<menuseparator/>
<menuitem label="Bookmark This Frame..." accesskey="F" oncommand="gContextMenu.addBookmarkForFrame();"/>
<menuitem label="Save Frame As..." accesskey="F" oncommand="saveDocument(gContextMenu.target.ownerD ocument);"/>
<menuseparator/>
<menuitem label="View Frame Source" accesskey="V" oncommand="gContextMenu.viewFrameSource();"/>
<menuitem label="View Frame Info" accesskey="i" oncommand="gContextMenu.viewFrameInfo();"/>
</menupopup>
</menu>
<menuseparator id="context-sep-properties"/>
<menuitem id="context-viewpartialsource-selection"
label="View Selection Source" accesskey="e" oncommand="gContextMenu.viewPartialSource('selecti on');"/>
<menuitem id="context-viewpartialsource-mathml" label="View MathML Source"
accesskey="e" oncommand="gContextMenu.viewPartialSource('mathml' );"/>
<menuitem id="context-viewsource" label="View Page Source" accesskey="V" oncommand="BrowserViewSourceOfDocument(_content.do cument);"/>
<menuitem id="context-viewinfo" label="View Page Info" accesskey="I" oncommand="gContextMenu.viewInfo();"/>
<menuitem id="context-metadata" label="Properties" accesskey="P" oncommand="gContextMenu.showMetadata();"/>
<menuseparator hidden="true" id="context-sep-bidi"/>
<menuitem hidden="true" id="context-bidi-text-direction-toggle"
label="Switch Text Direction" accesskey="w" oncommand="SwitchTextEntryDirection(gContextMenu.t arget)"/>
<menuitem hidden="true" id="context-bidi-page-direction-toggle"
label="Switch Page Direction" accesskey="g" oncommand="SwitchDocumentDirection();"/>
</popup>


 
Reply With Quote
 
Roland
Guest
Posts: n/a
 
      02-19-2005
On 19-2-2005 6:15, Leonidas Jones wrote:

> FoxWolfie Galen wrote:
>
>> On Fri, 18 Feb 2005 14:53:22 +0100, Roland <(E-Mail Removed)> wrote:
>>
>>
>>> In case you want to find the id of the menu item yourself, open the
>>> DOM inspector (Tools -> DOM inspector).

>>
>>
>>
>> I assume that's added by an extension?
>> I don't have a DOM Inspector under Tools.

>
>
> If you reinstall, select a Custom install, and choose Dom Inspector as
> an option.
>
> I suspect Roland may have been talking to me, as he know's I'll ahve the
> Dom inspector.
>
> Lee

Yeah, I was replying to you, Lee.
FoxWolfie: I assumed that the DOM inspector was available by default. I
must have installed it with the Custom install option, apparently :-[ .
--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
 
Reply With Quote
 
FoxWolfie Galen
Guest
Posts: n/a
 
      02-19-2005
On Sat, 19 Feb 2005 08:24:37 +0100, Roland <(E-Mail Removed)> wrote:

> FoxWolfie: I assumed that the DOM inspector was available by default. I
> must have installed it with the Custom install option, apparently :-[ .


It probably was the default. I probably unselected it when I originally
installed, not knowing what it could offer. However, I reinstalled, chose
custom, and selected the "Developer Tools." The DOM Inspector now appears.
Thanks to your pointer on how to find the menu-item ids, I was able to put
the appropriate code into my userChrone.css file.

My context menu now has four less items. It requires a browser restart and
clearing of the cache to take effect, but it works perfectly. Even though
you weren't replying to me, I thank you helping to make my Firefox even
better than it was.
--
FoxWolfie
 
Reply With Quote
 
Christopher Pollard
Guest
Posts: n/a
 
      02-19-2005
On Sat, 19 Feb 2005 09:33:49 GMT, FoxWolfie Galen <(E-Mail Removed)> wrote:


>My context menu now has four less items. It requires a browser restart and
>clearing of the cache to take effect, but it works perfectly. Even though
>you weren't replying to me, I thank you helping to make my Firefox even
>better than it was.


Damn, I mised the beginning of this thread. You mean there's a way to disable
certain menu items? As the operator of an internet cafe, I would like to know
how to stop customers setting an image as wallpaper. Especially 'unsuitable'
images...


--
Chris Pollard


CG Internet café, Tagum City, Philippines
http://www.cginternet.net
 
Reply With Quote
 
FoxWolfie Galen
Guest
Posts: n/a
 
      02-19-2005
On Sat, 19 Feb 2005 08:04:14 +0100, Roland <(E-Mail Removed)> wrote:

> <menuitem id="context-bookmarklink" label="Bookmark This Link..."/>
> <menuitem id="context-savelink" label="Save Link As..."/>
> <menuitem id="context-sendlink" label="Send Link..."/>


> <menuitem id="context-bookmarkpage" label="Bookmark This Page..."/>
> <menuitem id="context-savepage" label="Save Page As..."/>
> <menuitem id="context-sendpage" label="Send Link..."/>


Here's a little cosmetic thing I found. Two items are labeled as "Send
Link...", but one should probably be labeled as "Send Page...". When
right-clicking on part of a page that is not actually a link, it says "Send
Link" instead of "Send Page". Luckily, the real "Send Page" selection is
removed from the menu when someone clicks on a link, otherwise there would
be two apparent "Send Link" choices, where one would send the current page
and the other would send the link that was clicked on. Yes, it's a rather
small thing, and I would never have noticed it if I didn't see them all
listed together. I never actually clicked on any of the "Send" options
intentionally.
--
FoxWolfie
 
Reply With Quote
 
Roland
Guest
Posts: n/a
 
      02-19-2005
On 19-2-2005 10:51, Christopher Pollard wrote:

> On Sat, 19 Feb 2005 09:33:49 GMT, FoxWolfie Galen <(E-Mail Removed)> wrote:
>
>
>
>>My context menu now has four less items. It requires a browser restart and
>>clearing of the cache to take effect, but it works perfectly. Even though
>>you weren't replying to me, I thank you helping to make my Firefox even
>>better than it was.

>
>
> Damn, I mised the beginning of this thread. You mean there's a way to disable
> certain menu items? As the operator of an internet cafe, I would like to know
> how to stop customers setting an image as wallpaper. Especially 'unsuitable'
> images...


Yes (however some have reported that the following doesn't work). For
removing context menu "Set As Wallpaper", you have to add the following
lines to the file 'userChrome.css' in the folder named 'chrome' which is
located in the profile folder (see
<http://www.mozilla.org/support/firefox/edit>)

/* Remove 'Set As Wallpaper' from context menu*/
menuitem#context-setWallpaper {
display: none !important;
}


For other context menu items, I'll repeat part of the thread (for items
on the menubar's menus something similar could be done):
> On 19-2-2005 6:01, FoxWolfie Galen wrote:
>
>> On Fri, 18 Feb 2005 12:04:38 +0100, Roland <(E-Mail Removed)> wrote:
>>
>>
>>>>>>> /* Remove 'Send Link' from context menu*/
>>>>>>> menuitem#context-sendlink {
>>>>>>> display: none !important;
>>>>>>> }
>>>
>>>
>>> [Just to be sure: it's the 'Send Link' item in the context menu (right-click), not the item in the menubar File -> Send Link]

>>
>>
>>
>> I got it to work now. I had to restart Windoze though. Just restarting
>> Firefox had no effect, which I can't understand. I also guessed at the ID
>> for "Send Image", and was able to kill that menuitem as well. I'll be
>> trying to kill the "Set As Wallpaper" next. BTW, I'm using FF1.0 under
>> Win98SE.

>
>
> For "Set As Wallpaper" the id is "context-setWallpaper".
>
> Here's a list of all(?) items of the context menu of *my FF1.0* on Win2000 [Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0]. It may be different for other versions or on a different platform:
>
> <menuitem id="context-openlink" label="Open Link in New Window"/>
> <menuitem id="context-openlinkintab" label="Open Link in New Tab"/>
> <menuseparator id="context-sep-open"/>
> <menuitem id="context-bookmarklink" label="Bookmark This Link..."/>
> <menuitem id="context-savelink" label="Save Link As..."/>
> <menuitem id="context-sendlink" label="Send Link..."/>
> <menuitem id="context-copyemail" label="Copy Email Address"/>
> <menuitem id="context-copylink" label="Copy Link Location"/>
> <menuseparator id="context-sep-copylink"/>
> <menuitem id="context-viewimage" label="View Image"/>
> <menuitem id="context-copyimage-contents" label="Copy Image"/>
> <menuitem id="context-copyimage" label="Copy Image Location"/>
> <menuseparator id="context-sep-copyimage"/>
> <menuitem id="context-saveimage" label="Save Image As..."/>
> <menuitem id="context-sendimage" label="Send Image..."/>
> <menuitem id="context-setWallpaper" label="Set As Wallpaper..."/>
> <menuitem id="context-blockimage" class="menuitem-iconic" />
> <menuitem id="context-back" label="Back"/>
> <menuitem id="context-forward" label="Forward"/>
> <menuitem id="context-reload" label="Reload"/>
> <menuitem id="context-stop" label="Stop"/>
> <menuseparator id="context-sep-stop"/>
> <menuitem id="context-bookmarkpage" label="Bookmark This Page..."/>
> <menuitem id="context-savepage" label="Save Page As..."/>
> <menuitem id="context-sendpage" label="Send Link..."/>
> <menuseparator id="context-sep-viewbgimage"/>
> <menuitem id="context-viewbgimage" label="View Background Image"/>
> <menuitem id="context-undo" label="Undo"/>
> <menuseparator id="context-sep-undo"/>
> <menuitem id="context-cut" label="Cut"/>
> <menuitem id="context-copy" label="Copy"/>
> <menuitem id="context-paste" label="Paste"/>
> <menuitem id="context-delete" label="Delete"/>
> <menuseparator id="context-sep-paste"/>
> <menuitem id="context-selectall" label="Select All"/>
> <menuseparator id="context-sep-selectall"/>
> <menuitem id="context-keywordfield" label="Add a Keyword for this Search..."/>
> <menuitem id="context-searchselect" />
> <menuseparator id="frame-sep"/>
> <menu id="frame" label="This Frame" accesskey="h">
> <menupopup>
> <menuitem label="Show Only This Frame"/>
> <menuitem label="Open Frame in New Window"/>
> <menuitem label="Open Frame in New Tab"/>
> <menuseparator/>
> <menuitem label="Reload Frame"/>
> <menuseparator/>
> <menuitem label="Bookmark This Frame..."/>
> <menuitem label="Save Frame As..."/>
> <menuseparator/>
> <menuitem label="View Frame Source"/>
> <menuitem label="View Frame Info"/>
> </menupopup>
> </menu>
> <menuseparator id="context-sep-properties"/>
> <menuitem id="context-viewpartialsource-selection" label="View Selection Source"/>
> <menuitem id="context-viewpartialsource-mathml" label="View MathML Source"/>
> <menuitem id="context-viewsource" label="View Page Source"/>
> <menuitem id="context-viewinfo" label="View Page Info"/>
> <menuitem id="context-metadata" label="Properties"/>
> <menuseparator hidden="true" id="context-sep-bidi"/>
> <menuitem hidden="true" id="context-bidi-text-direction-toggle" label="Switch Text Direction"/>
> <menuitem hidden="true" id="context-bidi-page-direction-toggle" label="Switch Page Direction"/>

--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ Topic - How do I suppress a context menu (right-click menu)? (2012-02-22) FAQ server Javascript 0 02-22-2012 12:00 AM
add menu item to context (right-click) menu? lcplben Javascript 3 10-30-2009 11:56 PM
Allowing entry of a Carriage Return during data entry Mike Owen ASP .Net Web Controls 3 07-27-2006 02:34 PM
Form field entry directs to diff URLs based on entry? AtomicBob HTML 14 05-02-2006 07:07 AM
Can I holdup and activate the context-menu as a sub-menu? Michel Javascript 2 08-02-2004 09:54 PM



Advertisments