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!
You can do this for any instance without an extension with a custom search engine (on chrome) or bookmark keyword (on firefox)
Firefox:
- Create bookmark and add a keyword of “c” and replace the sublemmy name with “%s” in the url.
- In url bar, type “c”, then space, then the sublemmy name and enter -> goes to sublemmy
Chrome:
- Go to settings and find the search engines, select “Add”
- Define like this and replace the sublemmy name with “%s” in the url.
- From the omnibar, type “c” then space or tab, then the sublemmy, then enter -> goes to sublemmy
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!
Would be great to have an option to choose what community you want to use, not just lemmy.ml
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.
Ahh, I thought it was an actual add-on, I just saw your other comment with the manifest.
check out my comment below. you can do the same thing for whatever instance with a very simple setup.
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.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.
Is this up on Github, if not are there any plans to open source the project?
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" } } }
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.