Closed Bug 280297 Opened 20 years ago Closed 14 years ago

RFE: `Copy Frame Location' on Frame Context Submenu

Categories

(Firefox :: Menus, enhancement, P5)

enhancement

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: blakesley, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050125 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050125 Firefox/1.0+

Also, see the related bug 185239 to add "print this frame" option (which I have
voted for).  Also, note the use of the same keyboard shortcuts (F & W) on
multiple items in the frame submenu.  Should that be filed seperately?

Reproducible: Always

Steps to Reproduce:
1. Secondary click on a page within a frame with your pointing device.
2. Select the `This Frame' item.
3. The submenu will appear.
Actual Results:  
The submenu currently looks like this:

T_h_is Frame->Sho_w_ Only This Frame
              Open Frame in New _W_indow
              Open Frame in New _T_ab
              ------------------------
              _R_eload Frame
              ------------------------
              Bookmark This _F_rame...
              Save _F_rame As...
              ------------------------
              _V_iew Frame Source
              V_i_ew Frame Info


Expected Results:  
T_h_is Frame->Sho_w_ Only This Frame
              Open Frame in New _W_indow
              Open Frame in New _T_ab
              ------------------------
              _R_eload Frame
              ------------------------
              Bookmark This _F_rame...
              Save _F_rame As...
              _C_opy Frame Location
              ------------------------
              _V_iew Frame Source
              V_i_ew Frame Info

(I have located the item at the end of the appropriate item category where `Copy
Link Location' is on the link context menu.)
Severity: normal → enhancement
Assignee: firefox → nobody
QA Contact: bugzilla → menus
Not a total waste of time, but not important.  If someone wanted to do this I wouldn't object.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Target Milestone: --- → Future
(In reply to comment #1)
> Not a total waste of time, but not important.  If someone wanted to do this I
> wouldn't object.
I was about to report this as a bug but then I saw this. I don't think that this is a waste of time. I would find this very useful.
I attached an extension that I just put together to add this menu item.

Here's all the code needed:
1. add the following to nsContextMenu.js inside the nsContextmenu.prototype definition:

copyFrameLocation: function () {
  var frameLocation = this.target.ownerDocument.documentURIObject.spec;
  const clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
                    .getService(Components.interfaces.nsIClipboardHelper);  
  clipboard.copyString(frameLocation);
},

(I used documentURIObject instead of location because that is preferred starting with Firefox 3.)

2. add this to browser.xul inside the menupopup of <menu id="frame">:

<menuitem id="context-copyframe" label="Copy Frame Location" accesskey="C" oncommand="gContextMenu.copyFrameLocation();"/>

3. make the menu item's label localizable.


Please assign this bug to me.

I have never created a patch from scratch so if anyone knows how to do that better, feel free to use the code above in creating one.
Frank, thanks for your attempt. You can easily transform it into your own patch. It's not complicated. You only have to download the latest source, apply your changes and create the patch. We have a great documention here: https://developer.mozilla.org/en/Creating_a_patch
The use case for this feature is rare, and the frame location is already available from the dialog that appears when selecting This Frame -> View Frame Info from the content area context menu.

Considering that we want to remove redundant or non-useful menu items ( https://wiki.mozilla.org/Firefox/Features/UX_Priorities#Polish.2Fcleanup ), I'm calling this a WONTFIX.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: