Hi everyone,

So I have created a “sublemmy” add-on for lemmy.ml that lets you quickly jump to a community from the address bar in FireFox. Just type ‘c firefox’, for example, and it will go there and sort the community by new. Useful if you have a few communities you want to check regularly and quickly from any new browser window.

The one caveat is that this tool only works for the website lemmy.ml because that is the site hardwired into the search string, alas. Not sure if there is a way around that (that would maybe take 2 arguments instead of one?) but that’s where it’s at for now.

Link is included if anyone wants to use it!

  • ewe@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    2 years ago

    You can do this for any instance without an extension with a custom search engine (on chrome) or bookmark keyword (on firefox)

    Firefox:

    1. Create bookmark and add a keyword of “c” and replace the sublemmy name with “%s” in the url.

    1. In url bar, type “c”, then space, then the sublemmy name and enter -> goes to sublemmy

    Chrome:

    1. Go to settings and find the search engines, select “Add”

    1. Define like this and replace the sublemmy name with “%s” in the url.

    1. From the omnibar, type “c” then space or tab, then the sublemmy, then enter -> goes to sublemmy

    • heavybootsOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      Holy crap! TIL! And when did they add this? When I switched from Chrome back to FF years ago, I couldn’t find any way to make that happen!

    • heavybootsOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 years ago

      It’s literally just a manifest file. In Chrome, you can do it in the Search Engines area, but for some reason it has to be an add-on in FireFox. If someone wants to take it and run with it, I have zero problem with that, TBH. I just posted it since I wrote it for my own convenience in FireFox.

      This is the “code” (which is 90% about hello, I am an add-on!).

      {
      
          "manifest_version": 2,
          "name": "Lemmy.ML Community By New",
          "version": "1.0.1",
      
          "description": "Sorts the searched-for lemmy community by new. So 'c printsf' will return the printsf community already ordered by newest items first.",
      
          "icons": {
              "48": "icons/icon-48.png"
          },
      
          "chrome_settings_overrides": {
              "search_provider": {
                  "name": "Lemmy Community By New",
                  "search_url": "https://lemmy.ml/c/{searchTerms}?sort=New",
                  "keyword": "c",
                  "favicon_url": "https://lemmy.ml/pictrs/image/fa6d9660-4f1f-4e90-ac73-b897216db6f3.png"
              }
          }
      
      }
      
      
      • Sleeping@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 years ago

        Thanks! While it may just be a manifest, I believe that allowing access no matter how small the project is always a solid option. Who knows, maybe one day a beginner coder may come across this and wonder how to replicate it for their own uses, and while I’m sure there are other sources they could reference having another is always helpful.

    • heavybootsOP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Totally agree! I think that is not so simple as this is alas, and would require an actual add-on instead of just a super simple chrome modification.

    • ewe@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      check out my comment below. you can do the same thing for whatever instance with a very simple setup.

      • pe1uca@lemmy.pe1uca.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 years ago

        Yeah, that’s an option too, but it’ll require the user to know the parameters required.
        In the extension there could be a settings page with specific dropdowns for the extension to automatically create the URL required.

        • ewe@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          2 years ago

          Like…a set of bookmarks? I mean, if you really want an extension, thats fine, but it seems like both browsers have these features pretty well solved.