Open Bug 1160776 Opened 8 years ago Updated 4 months ago
Context menu item to copy element anchor link
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.6.0 Build ID: 20150331233809 Steps to reproduce: I often link other people to anchored elements on websites such as Wikipedia and would like to have a shortcut to the full URL. (in Wikipedias case you have to scroll up to the index and copy a linked header there - in other cases you have to right-click the element, use the web-developer tools to see the "id" value and then manually add it to the URL following a hash symbol, #) I right-clicked an HTML element (such as <h3>) that was not within an <a> tag and had "id" attribute set to a value which is possible to use as an anchor (example.com/location.html#someanchor). Actual results: The context menu popped up and showed all desired options except an alternative to copy a full URL to the right-clicked item using the "id" attribute as anchor value (#someanchor) Expected results: If the element I right-click to bring up a context menu is not already contained within an <a> tag and it has an "id" attribute, there should be an option to "Copy anchor location", giving the current active URL (stripping whatever the existing anchor value is, if any) followed by the id attribute as anchor. For example, consider this being http://example.com/index.html: <h3 id="somecategory">Some category</h3> <p>...</p> Right-clicking "Some category" and pressing "Copy anchor location" should set my clipboard to "http://example.com/index.html#somecategory"
There are add-ons that provide this functionality, like the following. https://addons.mozilla.org/firefox/addon/show-anchors-2/
Severity: normal → enhancement
Component: Untriaged → Menus
OS: Unspecified → All
Hardware: Unspecified → All
You need to log in before you can comment on or make changes to this bug.