Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Copy page title" option on the sidebar history context menu #33

Open
ericpa06 opened this issue Mar 5, 2022 · 4 comments
Open

"Copy page title" option on the sidebar history context menu #33

ericpa06 opened this issue Mar 5, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@ericpa06
Copy link

ericpa06 commented Mar 5, 2022

Hi, would it be possible to add a "Copy page title" option when dealing with the sidebar menu history panel? Like, so that in the same way you could copy the page URL you could also copy the page title. All the extension I tried so far didn't enable an option in that particular context menu. Something like this:
image_3023
.
Thank you for your attention.

@ericpa06 ericpa06 added the enhancement New feature or request label Mar 5, 2022
@aminomancer
Copy link
Owner

So, when you hit the "Copy" menu item, it doesn't simply copy the page URL, it copies the places node (a bookmark or history entry), which means serializing its data so it can be added to the clipboard. The actual clipboard item winds up having multiple representations and an app will just use the first compatible one, which in most cases will be the URL. But this is what allows you to copy/cut the bookmark and paste it into another bookmark folder. So that you're not just copying the URL, you're effectively copying the actual bookmark, and how that gets pasted depends on the application and context. So, if adding a new Copy menu item, you'd have to decide whether you want it to work the same way, or just really simply copy the title.

If you just want it to copy the title, then really an extension is the best approach, because there's a bunch of extension circuitry for adding context menu items to browsers. It's not easy for an autoconfig script to add context menu items to the sidebar. I have a few scripts that do that and they're really big. Because every time you open a sidebar it creates a new browser with a new window and new context menu. For the scripts I made, it makes more sense because the context menu items do things that extensions simply can't do. But copying a places node's title is trivial. I'm really not sure why an extension that purports to do this wouldn't have that feature. Can you link the extension(s) you're testing?

@ericpa06
Copy link
Author

ericpa06 commented Mar 6, 2022

Yeah, I also thought that this should be achievable through extensions as well, especially because there are extensions that add such options on other context menus, like when you click on a tab and you are able to copy its title, like this:
image

Currently I'm using this one here , which adds the options to copy the page title on a tab by right clicking on it:
https://addons.mozilla.org/en-US/firefox/addon/copy-selected-tabs-to-clipboar/

Although I tested others as well, and none of them added that option on the sidebar history context menu. Maybe there is already some extension buried somewhere on firefox addons site that does that. If I understood correctly what you said, this option is technically possible to be implemented through a extension.

UPDATED: I had posted the wrong extension link, I fixed the link, now it's pointing to the right extension that I use. The extension only adds this feature by the tab context menus, basically.

@benzBrake
Copy link

Agree with an extension is the best approach. A relavetive extension is bookmark tab here(BTH), BTH adds a menuitem to sidebar context menu. May be you can modify BTH to add this funciton yourself.

This morning I have add this function to my bookmark operate script and I found that is easy to make it work with history popup. You can try it: https://github.com/benzBrake/FirefoxCustomize/blob/master/userChromeJS/BookmarkOpt.uc.js
This script do not support multi-selection.

copytitle

@ericpa06
Copy link
Author

Thank you so much benzBrake, it worked flawlessly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants