I know firefox has the very useful “Copy clean Link” option in the context menu, but I would like a similar feature for copying links from any other software, like spotify for example. So I am looking for some software that hooks into the clipboard pipeline, and cleans any URL that gets added. I tried googling for something like it, but was completely unsuccessful. Does anyone have a clue how I might go about achieving this?

Thanks in advance :)

Edit: I found out about klipper’s actions, which provide the option to run a command when a string that matches a regex is added to the clipboard buffer. I am not sure how to properly use this though, so any help is appreciated!

  • traches@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 hours ago

    They have pretty different use cases. Localstorage is for when you want persistence across page loads, not necessarily specific to any particular page but specific to a browser. An example would be storing user-selected light or dark mode.

    Query parameters are specific to a page/URL and you get a lot of things for free when you use them:

    • back/forward navigation
    • bookmarking
    • copy-paste to share
    • page level caching
    • access on both server and client

    Query parameters are good for things like searches, filters, sorting, etc

    • silly goose meekah@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      I disagree. I definitely prefer REST APIs that use the file path for searches, filters, sorting. You get most if not all benefits from query parameters, and if done correctly it is just as clearly readable as query params.

            • silly goose meekah@lemmy.worldOP
              link
              fedilink
              arrow-up
              1
              ·
              23 minutes ago

              Having more beautiful and structured URLs. I suppose for those cases it’s more of a preference, and with the tooling I use (.NET) it’s not too difficult to achieve.

              I guess my gripe with your original statement was that I was thinking mostly of state like user login etc. I have to concede it’s not totally garbage for the cases you mentioned.