Giter VIP home page Giter VIP logo

Comments (4)

aminomancer avatar aminomancer commented on May 26, 2024 1

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?

from uc.css.js.

benzBrake avatar benzBrake commented on May 26, 2024 1

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

from uc.css.js.

ericpa06 avatar ericpa06 commented on May 26, 2024

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.

from uc.css.js.

ericpa06 avatar ericpa06 commented on May 26, 2024

Thank you so much benzBrake, it worked flawlessly.

from uc.css.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.