Lemmy Plugins and Userscripts

2173 readers
1 users here now

A general repository for user scripts and plugins used to enhance the Lemmy browsing experience.

Post (or cross-post) your favorite Lemmy enhancements here!

General posting suggestions:

Thanks!

founded 1 year ago
MODERATORS
1
 
 

Browser Extensions:

Mullem (Firefox):

lemmy-keyboard-navigation (Chrome):

Instance Assistant:

Lemmy Link:

Lemmy Go:

Lemmy Modern UI (Firefox Addon):

Lemmy Home Instance Helper:

Userscripts:

LemmyTools:

Lemmy Image Expand:

Lemmy Universal Link Switcher:

Compact Lemmy to old.Reddit Re-format:

Lemmy/KBin Redir:

GM Lemmy NewTab:

Lemmy Style Cleanup:

lemmy-keyboard-navigation:

Lemmy Federation Awareness:

Lemmy Subscription Helper:

Block lemmy instances:

Lemmy Local Community Redirect:

Lemmy Custom Navbar Links:

beehaw lemmy add home-instance name to username:

beehaw lemmy separate spacing of delete and edit buttons:

Lemmy post filter - Filter posts by title:

Lemmy Post Keyword Filter:

Filter lemmy.ml communities:

2
 
 

Table of Contents

  1. Introduction
  2. What is a UserScript?
  3. Installing a UserScript Manager
    • Installing Tampermonkey on Chrome
    • Installing Violentmonkey on Chrome
    • Installing Tampermonkey on Firefox
    • Installing Greasemonkey on Firefox
    • Installing Violentmonkey on Firefox
  4. Adding a UserScript
  5. Conclusion

Introduction

UserScripts are an incredible way to enhance and customize your browsing experience. They allow you to alter the functionality and layout of web pages, like Lemmy UI, by executing JavaScript codes on the client side. In this guide, we'll walk you through the process of installing UserScripts in your Chrome or Firefox browser.

What is a UserScript?

UserScripts are bits of code written in JavaScript that run in your web browser. They can modify the content, layout, and behavior of web pages. The true power of UserScripts lies in their ability to tailor your browsing experience to your needs.

Installing a UserScript Manager

To run UserScripts, you'll need to install a UserScript manager extension. Two popular ones are Tampermonkey and Greasemonkey.

Installing Tampermonkey on Chrome

  1. Open the Chrome web browser.
  2. Go to the Tampermonkey page on the Chrome Web Store.
  3. Click the "Add to Chrome" button.
  4. Confirm by clicking "Add extension" in the pop-up window.

Installing Violentmonkey on Chrome

  1. Open the Chrome web browser.
  2. Go to the Violentmonkey page on the Chrome Web Store.
  3. Click the "Add to Chrome" button.
  4. Confirm by clicking "Add extension" in the pop-up window.

Installing Tampermonkey on Firefox

  1. Open the Firefox web browser.
  2. Go to the Tampermonkey page on the Firefox Add-ons site.
  3. Click the "Add to Firefox" button.
  4. Confirm by clicking "Add" in the pop-up window.

Installing Greasemonkey on Firefox

  1. Open the Firefox web browser.
  2. Go to the Greasemonkey page on the Firefox Add-ons site.
  3. Click the "Add to Firefox" button.
  4. Confirm by clicking "Add" in the pop-up window.

Installing Violentmonkey on Firefox

  1. Open the Firefox web browser.
  2. Go to the Violentmonkey page on the Firefox Add-ons site.
  3. Click the "Add to Firefox" button.
  4. Confirm by clicking "Add" in the pop-up window.

Adding a UserScript

Now that you have a UserScript manager installed, you can add your own scripts. Here's how:

  1. Click on the Tampermonkey or Greasemonkey icon in your browser toolbar.
  2. Choose "Create a new script..." from the dropdown menu.
  3. You'll be taken to a new tab with a script template. Delete this template.
  4. Copy your UserScript and paste it into the empty field.
  5. Click "File" and then "Save" in the editor menu.

That's it! Your UserScript is now installed and will run on the sites specified in its metadata.

Conclusion

UserScripts offer an incredible way to customize your web browsing experience. Whether you're using Chrome or Firefox, Tampermonkey, Greasemonkey or Violentmonkey, you can create a browsing environment that's uniquely suited to your needs. Happy scripting!

Remember, while UserScripts are powerful tools, they should be used responsibly. Don't install scripts from sources you don't trust, as they can pose security risks. Always review the code of a UserScript before installing it to ensure it doesn't contain anything malicious.

3
 
 

Feel free to give it a spin and add any feature requests on github!

4
 
 

cross-posted from: https://lemmy.ca/post/6770347

This is a very small update, but hopefully it's helpful! As I mentioned in the last update, I'm a little tied up with other commitments right now, so I haven't had a chance to implement the other features on the to-do list. This one was requested the other day, and it was simple to add since I could reuse a lot of existing code.


Links:


โ“ What is Instance Assistant?

If you're new to Instance Assistant, it is a browser extension with a collection of tools and features to simplify your browsing experience on Lemmy and Kbin. It is available on Chrome, Firefox, and Edge; you can also install it from the releases page on GitHub.

For a full list of features, please see the GitHub homepage: https://github.com/cynber/lemmy-instance-assistant


โญ What's new in v1.2.6?

  • Redirect user profile pages: When you want to message a user and click on their profile, you might end up on a foreign instance. To message them, you need to modify the URL or copy/paste. Instead, you will now find a little button to jump you to your home instance.


๐Ÿ’› Also

Thank you for all the suggestions and feedback! Like I said before, I'm really happy to see that people are using the extension and finding it useful. Please continue to make suggestions and contribute your expertise.

Cheers :)

5
 
 

cannot find this anywhere. i don't want to automatically hide everything i scroll past, or everything from an instance, just certain posts i don't want to see or engage with

6
 
 

UPDATES BELOW

So I browse on the desktop using the mlmym/old.lemmy client (e.g. http://old.lemmy.world) because old habits die hard.

One of the many things I found myself missing from RES & Reddit was the ability to customise the community bar at the top of the page to contain some links to my favourite communities. I had a spare minute this morning to throw together a userscript for just that:

Here's a pastebin with the script. Create a new userscript in tampermonkey (or whatever userscript plugin you use), drop the code in, change the array of communities at the top to be the ones you want prepending to the list, and you should be good.

Make sure to add the server suffix to any communities from other instances and if you want to use this on another instance other than lemmy.world, just change the match rule in the userscript header comment.

I didn't host on greasyfork as I'm probably not going to make any further changes, and I'd need to come up with something a bit more sophisticated than an array of communities. I'll update this post if I ever change my mind on that

Update

So I guess I wasn't happy with leaving it alone:

Here it is on greasyfork https://greasyfork.org/en/scripts/474756-lemmy-mlmym-community-bar-customisation

I added localStorage and a simple config GUI to configure the list of favourites now, no reordering yet (without just removing and re-adding in a different order), but I imagine I'll end up adding that in time

Update 2

And another update:

I've just updated GreasyFork with 0.3

  • Added reordering
  • Added background fade and background click to close
  • Added favourite/unfavourite button to the community sidebar
7
 
 

Hi everyone, I'm excited to announce one more release before I take a short break. I have some other stuff starting up, so I won't be pushing out new features as fast, but I'll still be around to manage the project. (more at the end)

Links:


โ“ What is Instance Assistant?

If you're new to Instance Assistant, it is a browser extension with a collection of tools and features to simplify your browsing experience on Lemmy and Kbin. It is available on Chrome, Firefox, and Edge; you can also install it from the releases page on GitHub.

For a full list of features, please see the GitHub homepage: https://github.com/cynber/lemmy-instance-assistant


โญ What's new in v1.2.5?

  • Redirect posts to your home instance!: Post pages now have a redirect button that will find the same post on your home instance(1). You don't have to hunt it down yourself anymore.
  • Posts related to this webpage buttons in popup & sidebar
    • Make a post: You can now create a post from any webpage! Click the 'Make a Post' button in the extension popup or sidebar to generate a draft post with autofilled title, URL, and body contents. Afterwards, just select a community and hit post. (This currently works for both Lemmy & Kbin, but custom frontends are untested while they develop). Try it here: https://lemmy.ca/post/4478560
    • Open Posts: This will find any posts about the webpage/article/video that you are looking at. Use it to see if something has already been posted, or to find related discussions about it. When there are multiple posts, it will ask before opening them all. (see note on risks and why it doesn't count automatically)
  • Post an image: You can now right-click on an image, anywhere on the web, and hit "Post this image". It will open a new tab and autofill the title, image link, and add the page URL to the body as "Source: URL". Try it here: https://lemmy.ca/post/1282303
  • Reorganizing popup:
    • I fixed the issue where the popup would still display a button after removing all instances from the list.
    • The number of default instances in the popup was reduced to 4
  • Added settings:
    • You can now hide onboardining guides to make the interfaces less wordy
  • General styling changes, wording improvements, and bugfixes

(1) This is an important feature to me because this little annoyance was part of why I set out to create the extension in the first place. Thanks to some help from @zero_gravitas, I was able to use the Lemmy API to grab the post details, and then run a search for it on your home instance. While most posts should only bring one result, there is a chance that there are multiple posts by the same user, in the same community, with the same title. If this is an issue, I'll make this search more specific.


๐Ÿ—ฃ๏ธ My questions for you:

Improving 'post to Lemmy'

  • Right now the 'Post to Lemmy' button does a very basic search in the page meta tags for information. This works for most websites, but it is not perfect. What websites do you usually post from, and is the extension doing a good job of replicating how you format the post? Please share both good and bad examples, so we can fix what isn't working and keep what is.

Improving Post search

  • Having the extension automatically count the number of posts and display it in the icon would be pretty nice, since then you would know about any posts for the news article / blog / video that you are looking at. However, there are privacy implications with this since it needs to send the URL to your home instance to do the search.
  • I would like to add the option to whitelist specific websites, so the user can choose what browsing data they want to find posts for. Is this something you would list to use? What websites would you whitelist?

Anything else?

Please share any issues that you find. Lemmy and Kbin instances have a lot of variation in how things are structured, so there are bound to be some bugs that I haven't found yet. If you have any ideas for new features, please share them too! I'm always looking for new ideas to add to the project.


๐Ÿ”ฎ Cool ideas being discussed for the future

  • Account switcher & ability to save login info to extension
  • Reddit migrator tools
    • multireddit input should convert subscriptions to official Threadiverse replacements, or large related communities
    • embeds on Subreddit sidebars to search for similar community
    • button on post pages to cross-post to home instance
  • Prepping for Firefox Mobile app, now that they are opening mobile up to all extensions!
  • Keyboard hotkeys, possibly collaborating with someone that already implemented something similar

For the most up to date information, see the issues or the project road map


๐Ÿ’› Finally

Thank you for all the suggestions and feedback so far! I'm really happy to see that people are using the extension and finding it useful. I'm looking forward to seeing what we can do with it in the future.

Like I said above, I won't be as active over the next few months in terms of getting new features out. The extension is now in good shape, and it covers most of the important use cases. There's still lots of cool stuff we can do with it, so please contribute ideas and expertise! When I get a chance, I'll pop in and grab a few more issues.

Cheers :)

8
 
 

This is a gift for all you mlmym lovers out there:

A userscript that allows you to navigate lemmy with HJKL keyboard navigation, now with mlmym support :) This is an initial release and only available on github for now.

ALL credits go to InfinibyteF4 for making this happen ๐Ÿ†

EDIT: to link the updated file which works for both vanilla lemmy and mlmym

9
 
 

When you run the script, it will show a textarea with the markdown code for crediting sources. I use it to save time when posting to Lemmy.

Usual disclaimer: I've tested it but only to a certain point (with my environment). If you find any issue you don't know how to fix, let me know.

EDIT: Here are the scripts in pastebin raw text (lemmy currently replaces the ampersand signs with & and it breaks the scripts:


Tip (for firefox users): you can set a keyword for a bookmarklet that you can run form the navbar. Once you get used to "Control+L (focus navbar) > keyword" it becomes really frictionless.


For generic pages, the output is:

Source: [Page title](page_url)

For Tumblr posts the outuput is:

Source: [Page title](page_url)

Tumblr archive: https://site_url/archive

RSS Feed: https://site_url/rss

For ArtStation pages the outuput is:

Source: [Page title](page_url)

> Description (if there is any)

ArtStation profile: https://profile_url

RSS Feed: https://profile_url.rss

pretty printed code

(function() {
    var sourceCode = "";
    var isArtStation = document.location.host.endsWith("artstation.com");
    if (isArtStation) {
        sourceCode = getArtstationInfo();
    } else {
        var title = ("%s" || document.title).replace("[", "\\[").replace("]", "\\]");
        sourceCode = `Source: [${title}](${document.location.href})`;
        var isTumblr = [...document.querySelectorAll("link")].filter(e => e.href && e.href.indexOf("tumblr.com") >= 0).length > 0;
        if (isTumblr) {
            var tumblrUrl = `${document.location.protocol}//${document.location.host}`;
            sourceCode += "\r\n\r\nTumblr archive: " + tumblrUrl + "/archive";
            sourceCode += "\r\n\r\nRSS Feed: " + tumblrUrl + "/rss";
        }
    }
    var inpt = document.getElementById("crul-source-code");
    if (!inpt) {
        inpt = document.createElement("textarea");
        inpt.id = "crul-source-code";
        inpt.style.position = "fixed";
        inpt.style.color = "black";
        inpt.style.top = "5vh";
        inpt.style.left = "5vw";
        inpt.style.height = "90vh";
        inpt.style.width = "45vw";
        inpt.style.border = "solid 2px tomato";
        inpt.style.zIndex = "99999";
        document.body.appendChild(inpt);
        var closeBtn = document.createElement("button");
        closeBtn.onclick = () => {
            inpt.remove();
            closeBtn.remove();
        };
        closeBtn.innerHTML = "X";
        closeBtn.style.position = "fixed";
        closeBtn.style.width = "30px";
        closeBtn.style.height = "30px";
        closeBtn.style.background = "tomato";
        closeBtn.style.color = "white";
        closeBtn.style.border = "none";
        closeBtn.style.zIndex = "999999";
        closeBtn.style.top = "5vh";
        closeBtn.style.left = "calc(50vw - 30px)";
        document.body.appendChild(closeBtn);
    };
    inpt.value = sourceCode;
    inpt.focus();
    inpt.select();

    function getArtstationInfo() {
        var sourceCode = "";
        var title = document.querySelector(".project-description-title");
        if (!title) return;
        var author = document.querySelector(".project-author-name h3 a");
        if (!author) return;
        title = title.innerText.replace("[", "\\[").replace("]", "\\]");
        sourceCode = `Source: [${title} (by ${author.innerText} - ArtStation)](${document.location.href})`;
        var description = document.querySelector(".project-description p:first-child");
        if (description && description.innerText) {
            description = description.innerText.replaceAll("\n", "  \n> ");
            sourceCode += ` \r\n\r\n> ${description}`;
        }
        var profileUrl = document.querySelector(".project-author-name a").href;
        sourceCode += "\r\n\r\nArtStation profile: " + profileUrl;
        sourceCode += "\r\n\r\nRSS Feed: " + profileUrl + ".rss";
        return sourceCode;
    }
})();


One-liner:

javascript:(function() {var sourceCode = "";var isArtStation = document.location.host.endsWith("artstation.com");if (isArtStation) {sourceCode = getArtstationInfo();} else {var title = ("%s" || document.title).replace("[", "\\[").replace("]", "\\]");sourceCode = `Source: [${title}](${document.location.href})`;var isTumblr = [...document.querySelectorAll("link")].filter(e => e.href && e.href.indexOf("tumblr.com") >= 0).length > 0;if (isTumblr) {var tumblrUrl = `${document.location.protocol}//${document.location.host}`;sourceCode += "\r\n\r\nTumblr archive: " + tumblrUrl + "/archive";sourceCode += "\r\n\r\nRSS Feed: " + tumblrUrl + "/rss";}}var inpt = document.getElementById("crul-source-code");if (!inpt) {inpt = document.createElement("textarea");inpt.id = "crul-source-code";inpt.style.position = "fixed";inpt.style.color = "black";inpt.style.top = "5vh";inpt.style.left = "5vw";inpt.style.height = "90vh";inpt.style.width = "45vw";inpt.style.border = "solid 2px tomato";inpt.style.zIndex = "99999";document.body.appendChild(inpt);var closeBtn = document.createElement("button");closeBtn.onclick = () => {inpt.remove();closeBtn.remove();};closeBtn.innerHTML = "X";closeBtn.style.position = "fixed";closeBtn.style.width = "30px";closeBtn.style.height = "30px";closeBtn.style.background = "tomato";closeBtn.style.color = "white";closeBtn.style.border = "none";closeBtn.style.zIndex = "999999";closeBtn.style.top = "5vh";closeBtn.style.left = "calc(50vw - 30px)";document.body.appendChild(closeBtn);};inpt.value = sourceCode;inpt.focus();inpt.select();function getArtstationInfo() {var sourceCode = "";var title = document.querySelector(".project-description-title");if (!title) return;var author = document.querySelector(".project-author-name h3 a");if (!author) return;title = title.innerText.replace("[", "\\[").replace("]", "\\]");sourceCode = `Source: [${title} (by ${author.innerText} - ArtStation)](${document.location.href})`;var description = document.querySelector(".project-description p:first-child");if (description && description.innerText) {description = description.innerText.replaceAll("\n", "  \n> ");sourceCode += ` \r\n\r\n> ${description}`;}var profileUrl = document.querySelector(".project-author-name a").href;sourceCode += "\r\n\r\nArtStation profile: " + profileUrl;sourceCode += "\r\n\r\nRSS Feed: " + profileUrl + ".rss";return sourceCode;}})();
10
 
 

cross-posted from: https://lemmy.world/post/3689844

This is a User Script I made that makes some adjustments to Lemmyโ€™s UX (works on lemmy.world and lemmy.ml).

Project page: https://github.com/pro-tarr/lemmy-ux-improvements

What it does

  • Quick access to communities you moderate: This script adds a list of the communities you moderate right below your profile link in the top-right menu, so you don't need to load the profile page just to access your communities.

  • Open thumbnail links in a new tab: Links in thumbnails will automatically open in a new tab (image links will continue with their default behavior).

If you want to improve this in-a-rush code, expanding its features of fixing bugs, feel free to send pull requests.

How to install

  • Install the Violentmonkey extension.
  • Copy the source code and add it into Violentmonkey extension (if you have the extension installed, it will prompt you to install the script when you access the link to the code).

Happy Lemmy-ing!

11
 
 

cross-posted from: https://lemmy.ca/post/3232301


Status & Download Links:

Firefox v1.2.4 Chrome v1.2.4 Edge v1.2.3

Download from source: release v1.2.4 (github.com)

  • While Edge and Opera are awaiting approval, you can install v1.2.4 from here, or through the Chrome store

Hi everyone!

On the surface, this update brings a handful of features integrating the extension with other tools and services. We have the first of many features from the LemmyTools userscript, as well as the support for Alexandrite and Photon frontends. You can also directly search for communities through Lemmyverse.net and for posts through search-lemmy.com, among other small changes.

The biggest change was behind the scenes. I've completely refactored the code throughout the extension. Now that we have a clearer plan for the extension, I simplified all around, such as consolidating most functions to a central utils.js file. I also reworked the settings, and unfortunately this means you may have to add your home instance again. Moving forwards, it should be a lot easier to maintain the extension and for people to collaborate, which brings me to:

Want to help?

Get started:

I've put together some notes on how the extension is structured for those that want to help. The extension itself is fairly simple, and it doesn't use any particular framework or anything. It should a great first project to work on, even if you are just learning or new to web development.

Having more people add to one place would make it easier for users that are juggling many extensions and userscripts. That's why I've been focussed on having a more intuitive structure for the project and leaving detailed notes and comments. I'm also likely not going to have as much time starting next month so I'm trying to do what I can now to get everything rolling.

If you don't know where to start or just have an idea, let me know and I'll see what I can do :)

As always, you can add new ideas and issues here: https://github.com/cynber/lemmy-instance-assistant/issues


All new improvements with v1.2.4

New Changes

  • search for communities through Lemmyverse.net or for posts through lemmy-search directly from the popup or sidebar
  • You now have the option to hide the default Lemmy sidebar (more LemmyTools features to come!)
  • Replaced non-functional 'subscribe' button on foreign /communities pages (only when no account is signed in, so not to replace something functional)
  • Support for Alexandrite & Photon frontends. Test them here:
  • Fix for generated link on CommunityNotFound pages
  • Completely refactored the code to move repetitive functions to a utils.js file

Future Plans:

  • Exploring a 'Reddit migrator' tool, similar to the mobile tool in Voyager, powered by lemmyverse.net
  • Adding more features from LemmyTools Userscript, with help from /u/[email protected]
  • Prepping for Firefox Mobile app, now that they are opening mobile up to all extensions!
  • Keyboard hotkeys, possibly collaborating with someone that already implemented something similar
  • Adding icons and simplifying the design, as the menus are getting very wordy
    • settings to limit onboarding / help instructions
  • Ability to have multiple 'home instances'
  • Finishing the setup so that people can contribute translations / other languages to the extension.
12
12
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/plugins
 
 

Description

It adds a scroll to parent button to nested comments (after clicking the "more" button). If you then press the more button on the parent comment, you'll see a back to child button that will scroll back to the comment you came from on click (also after clicking the "more" button).

Install

  1. Install via Greasy Fork or copy the code from there.

  2. Replace the @match value with your instance.

Screenshots

Notes

Tested on Firefox with Tampermonkey and Violentmonkey.

13
 
 

This was a HUGE part of my reddit experience and I have yet to found an alternate.

I began using kbin instead of lemmy because of this userscript which has pretty much the exact functionality I'm looking for

https://greasyfork.org/en/scripts/469175-kbin-hide-posts-after-voting

but Kbin blocks a LOT of communities that I want to interface with. I feel like I'm missing out if I'm not on Lemmy ... but I feel like I hate the user experience without the automatically hiding posts :(

Any advise?

14
 
 

I mean, I wanted to start work on it, but if someone's already released/working on one then I'd just happily use those instead.

Also, the absence of a thing usually means it's not possible to have. In my mind I think it's easy to have userscript code make API posts on behalf of the user, but maybe somehow in the intricate layers of tech it's made impossible or tedious. If so, I'd like to know before I learn it the hard way.

15
25
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/plugins
 
 

There are likely various edge cases I've missed, and I am not too sure on performance compared to a purpose-built userscript, but these seem to work well enough for my use cases.

Throw these to My filters in uBO settings. May also work with AdGuard, but I can't support you there as I don't use it. Other ad blockers probably won't work, but then why are you using an ad blocker that isn't uBO anyway?

Remove the exclamation mark preceding the rules and adjust the placeholders accordingly. If you need multiple filters copy paste the appropriate lines.

You may need to replace the lemmy.* part if your home instance is on a different (sub)domain. I'm not using .lemmy-site and a global selector for performance reasons.

! Post filters use :has instead of :upward to take advantage of native CSS support on browsers that implement it.
! If :has is not implemented, uBO will emulate it via JS. :upward might be more efficient on those cases.

! Lemmy: Filter post by link domain
! lemmy.*##.post-listing:has(.fst-italic[href*="example.com"])

! Lemmy: Filter post by keyword in title
! lemmy.*##.post-listing:has(.post-title:has-text(/\bkeyword\b/i))

! Lemmy: Filter post by author instance
! lemmy.*##.post-listing:has(.person-listing[title$="@example.com"])

! Lemmy: Filter post by community instance
! lemmy.*##.post-listing:has(.community-link[title$="@example.com"])

! Lemmy: Filter post by instance (author or community)
! lemmy.*##.post-listing:has([title$="@example.com"]:is(.person-listing, .community-link))

! Lemmy: Filter post by community name (any remote instance)
! lemmy.*##.post-listing:has(.community-link[title^="!politics@"])

! Lemmy: Filter post by community name (home instance, though in this case you can just use lemmy's own blocking)
! lemmy.*##.post-listing:has(.community-link[title="!politics"])

! Lemmy: Filter comment by keyword 
! lemmy.*##.md-div:has-text(/\bkeyword\b/i):upward(.comment)

! Lemmy: Filter comment by author instance
! lemmy.*##.person-listing[title$="@example.com"]:upward(.comment)

! Lemmy: Filter both by author instance
! lemmy.*##.person-listing[title$="@example.com"]:upward(:is(.post-listing, .comment))
16
 
 

Edit: I solved this issue by deleting reseting the script in Tampermonkey, deleting the script and then also deleting Tampermonkey from my chrome. Then I did a full flushing of cache.

Hello fellow lemmys! I've started to use LemmyTools, but I did a thing that made the toolbar for this script to disappear from my home instance (lemmy.world).

What I think I did was to have nothing in the "LemmyTools bar vertical position", because after I saved that it disappeared.

I've tried the following to fix this:

  • Reinstalled Tampermonkey
  • Change the settings on another instance
  • Factory reset LemmyTools (inside Tampermonkey)

But nothing works. Any suggestions as to how to fix this? I LOVE this script and I want to continue to use it as it's so useful but this is just a weird thing I've been able to fuck up ๐Ÿคฃ

17
18
submitted 1 year ago* (last edited 4 months ago) by [email protected] to c/plugins
 
 

cross-posted from: https://lemmy.blahaj.zone/post/1312795

[Image description: A screenshot of the lemmy.blahaj.zone front page with a custom userstyle applied. The userstyle features a dark gray background with medium gray text and brightly-colored accents of purple, pink, orange, and cyan. The right sidebar cards are a light shade of gray with lighter gray text, pink buttons, and orange links]

A few weeks ago I decided to try my hand at bringing my favorite theme to Lemmy and this userscript was born. It's still in the early stages so there are some wrinkles to iron out, but I just pushed a big update with better contrast, style fixes, and streamlined code.

I've received several requests to turn it into a native Lemmy theme but have no idea how to do that. If anyone has any tips on theming, interest in collaborating, or a Lemmy instance where I could test a native theme, hit me up! You can find all the code here on Codeberg.

18
 
 

As the title says, I got tired of hearing about twitter and reddit so provide this userscript a comma separated list of keywords and you will no longer see posts containing those keywords. I'd love to see this functionality built into Lemmy itself, but until then here's a userscript.

Repo link

19
 
 

cross-posted from: https://thesimplecorner.org/post/112995

I wanted to get this update out... As I believe the top bar is entirely more usable than the sidebar. It is of basic functionality and works nicely. Next release will allow you to pin favorite communities to the top bar (shown when you are not searching for a community).

Also, exciting news, we are beginning to explore adding LemmyTools functionality to the "Instance Assistant for kbin & lemmy!" by cynber browser addon found: https://github.com/cynber/lemmy-instance-assistant & [email protected].

For now, I will keep the updates for the UserScript version of LemmyTools as is while integration into the addon is being worked.

I am having a lot going on in my personal life so that is why updates are a bit slower. Thank you to cwagner for making the lovely user tagger feature as of last release as that is a nifty feature.

Please feel free to tell me what you think about everything.

.

.

.

.

Installation and Configuration:

1 - Browser must have a Userscript addon (Tampermonkey, Greasemonkey, Etcโ€ฆ). Tested with Greasemonkey.

2 - Download either the .JS file or install from greasyfork.

3 - Set home lemmy instance via options page once script is loaded (and manually edit the homeInstance variable in script for all functionality)

This script is all done by a complete amateur for fun. Enjoy and feel free to fork it!

Get it here: Github or GreasyFork

Please submit issues to the github for feature requests and problems: Github LemmyTools Issues

20
 
 

cross-posted from: https://lemmy.ca/post/2012318

Links:

  • Firefox
  • Chrome
  • Edge - v1.2.3 is still being approved, you can grab the release from Github if you are eager
  • Opera: Still under review, please download from Chrome webstore or Github release.

For questions / support: [email protected] (alternate: https://lemmy.ca/c/instance_assistant)

What's new?

(read on the wiki)

  • You can now customize the instance list to match which instances you actually use. This should be helpful for those that have accounts on different instances.
  • Added a settings page so that you can turn off features that you don't want active
  • Added buttons for helpful tools that let you explore Lemmy/Kbin communities (with lemmyverse.net), and search across Lemmy sites (with search-lemmy.com).
  • Added a sidebar for those that prefer it (works on Firefox, Chrome & Opera; Edge doesn't have sidebars yet but the code is there)
  • Fix for issues with the search trigger on the community not found page (thank-you to whqwert!)
  • Various bugfixes, small theme changes, and improved wording

What's coming up?

(read on the wiki)

  • Working with the amazing /u/[email protected] to bring over features from the LemmyTools Userscript^1^
  • Integrating lemmyverse.net and search-lemmy.com so you can do everything right on your community page^2^
  • Adding icons and simplifying the design, as the UI is getting wordy
  • Adding support for alternative home instances (ex. Alexandrite - Issue 14)
  • Ability to have multiple 'home instances', so you can open it in any without having to change your home instance each time.
  • Finishing the setup so that people can contribute translations / other languages to the extension.
  • Getting the extension on Opera (no immediate plans, but this would be good to have)

More details:

  1. /u/[email protected] has created a really useful userscript that you can find here: https://thesimplecorner.org/c/lemmytools. We're going to be working together to bring those features into Instance Assistant, so that you can have all the features in one place.

  2. Right now there are buttons to explore Lemmy/Kbin communities (with lemmyverse.net), and search across Lemmy sites (with search-lemmy.com). Both of these take you to the respective webpages. Instead, it might be nicer to have a lightweight version right on the Lemmy/Kbin community page (or in the extension popup/sidebar). This should be possible using their APIs/data access, and I have a little working proof of concept already (see GitHub)

I'm new, what is this?

Instance Assistant is a browser extension that started out as a way to quickly jump from one community to the version on your home instance, so that you could subscribe/participate immediately. Since then, a few other features have been implemented:

Features

  • Redirect to your home instance:
    • Buttons will be added to the sidebar of any Lemmy or Kbin community you visit, which will let you open the same community on your home instance.
  • Open links in home instance:
    • Right click context menu will allow you to open any links in your home instance
  • Improved Error Pages:
    • 'Community not found' pages now have better information, a button to trigger a fetch, a button to open a community in the source instance, and more.
  • Customizable popup & sidebar menus:
    • Customizable list of instances to let you quickly switch home instances. This is great for if you have multiple accounts on different instances.
    • There are also buttons for helpful tools that let you search for communities (with lemmyverse.net), and search across Lemmy sites (with search-lemmy.com).
  • Settings:
    • You can change the default behaviour of the extension, customize the popup & sidebar menus, and turn off features you don't want to use.
21
 
 

What is it?

Lemmy Keyboard Navigation is a RES-like userscript that allows you to navigate Lemmy with the keyboard. Supports both HJKL and arrow navigation.

What's new

  • Due to popular demand, default navigation is now HJKL (aka RES or Vim-style). Change vimKeyNavigation into false if you wish to use Keyboard Arrows instead.
  • Enter key for comments collapse โŽ†
  • S key for save post/comment ๐Ÿ’พ
  • R key to go to community of a post ๐ŸŒ
  • Now also available as a Chrome Extension, however it's still at version 1.8, waiting for Google to approve 1.9, should be there in few days.

Feel free to provide feedback and of course PRs are always welcome! Special thanks to @aglidden for the major contributions.

22
 
 

cross-posted from: https://lemm.ee/post/1606937

If you didn't already know about it, I included the full description after the release notes.

Release 1.3.0

  • You can now add multiple secondary instances: so if you, like me, also have an account on lemmynsfw.com (or of course any other instance), you can add that there and not have links rewritten for that instance
  • You can manually enter your home instance. Useful for self-hosted instances that didn't show up in my instance list.

Full Description Below:

Description

Lemmy Universal Link Switcher, or LULs for short, scans all links on all websites, and if any link points to a Lemmy instance that is not your main/home instance, it rewrites the link so that it instead points to your main instance.

Also works on Firefox Android with the Tampermonkey extension!

Features

  • Rewrite links to Lemmy posts/comments to point to your home instance. Only after hovering over them, because getting home posts/comments links require communicating with the Lemmy servers, and we don't want to spam the servers.
    video demonstrating links to posts being rewritten

  • Instantly rewrite all links of community or user links to Lemmy/kbin on all websites everywhere to your new instance! The rewritten links will have an icon next to it, and hovering/touching the icon will show you the original link, allowing you to go there if you want to.
    community links being rewritten

  • If you are already on a page that has a corresponding page on your home instance, a link will automatically be added to the page header.
    the header link to your home instance when already on a remote post

Home Instance Setup

Simply visit the Lemmy instance you want to set as your home while the script is active. You will be asked if you want to set this instance to your home instance:
popup to select home instance

Settings

If you want to change your home instance or add secondary instances in case you have multiple accounts, simply go to the script settings, accessible within Violent/Tampermonkey directly, or alternatively within any Lemmy instances' settings.
button to set your new home instance

Common Issues

Coming soon

  • Rewrite kbin post/comment links
  • Better rewriting support for kbin community/user urls (e.g. sort options are currently ignored)
  • Nicer tooltip styling (fit into page theme)
  • Signify that "Show at home" button is loading for posts/comments
  • Integrate with lmmy.to redirector
23
 
 

Release 1.3.0

  • You can now add multiple secondary instances: so if you, like me, also have an account on lemmynsfw.com (or of course any other instance), you can add that there and not have links rewritten for that instance
  • You can manually enter your home instance. Useful for self-hosted instances that didn't show up in my instance list.

Full Description Below:

Description

Lemmy Universal Link Switcher, or LULs for short, scans all links on all websites, and if any link points to a Lemmy instance that is not your main/home instance, it rewrites the link so that it instead points to your main instance.

Also works on Firefox Android with the Tampermonkey extension!

Features

  • Rewrite links to Lemmy posts/comments to point to your home instance. Only after hovering over them, because getting home posts/comments links require communicating with the Lemmy servers, and we don't want to spam the servers.
    video demonstrating links to posts being rewritten

  • Instantly rewrite all links of community or user links to Lemmy/kbin on all websites everywhere to your new instance! The rewritten links will have an icon next to it, and hovering/touching the icon will show you the original link, allowing you to go there if you want to.
    community links being rewritten

  • If you are already on a page that has a corresponding page on your home instance, a link will automatically be added to the page header.
    the header link to your home instance when already on a remote post

Home Instance Setup

Simply visit the Lemmy instance you want to set as your home while the script is active. You will be asked if you want to set this instance to your home instance:
popup to select home instance

Settings

If you want to change your home instance or add secondary instances in case you have multiple accounts, simply go to the script settings, accessible within Violent/Tampermonkey directly, or alternatively within any Lemmy instances' settings.
button to set your new home instance

Common Issues

Coming soon

  • Rewrite kbin post/comment links
  • Better rewriting support for kbin community/user urls (e.g. sort options are currently ignored)
  • Nicer tooltip styling (fit into page theme)
  • Signify that "Show at home" button is loading for posts/comments
  • Integrate with lmmy.to redirector
24
 
 

Thanks to @aglidden for the PR work

Direct link to userscript -> https://github.com/vmavromatis/Lemmy-keyboard-navigation/raw/main/lemmy-keyboard-navigation.user.js

25
15
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/plugins
 
 

After my post with the comment sorting script yesterday, I thought that since I was already doing script rewriting I might as well go further, so here is a script implementing infinite scrolling for the home page and communities on Lemmy.

I didn't publish it as a separate script to comment sort since both are incompatible, as they both edit lemmy's client.js. If sorting comments by Top annoys you, just change the defaultSort back to Hot in the script.

Edit: Fixed the spinner on instances other than lemmy.world.

view more: next โ€บ