this post was submitted on 23 Jun 2023
13 points (100.0% liked)

Firefox

18050 readers
183 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 5 years ago
MODERATORS
 

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!

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 9 points 2 years ago* (last edited 2 years ago) (1 children)

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

[–] [email protected] 1 points 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!

[–] [email protected] 4 points 2 years ago (2 children)

Would be great to have an option to choose what community you want to use, not just lemmy.ml

[–] [email protected] 2 points 2 years ago (1 children)

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.

[–] [email protected] 1 points 2 years ago

Ahh, I thought it was an actual add-on, I just saw your other comment with the manifest.

[–] [email protected] 0 points 2 years ago (1 children)

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

[–] [email protected] 1 points 2 years ago (1 children)

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.

[–] [email protected] 0 points 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.

[–] Sleeping 4 points 2 years ago (1 children)

Is this up on Github, if not are there any plans to open source the project?

[–] [email protected] 3 points 2 years ago (1 children)

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 2 points 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.

load more comments
view more: next ›