A couple of weeks ago, @shazbot made this post about a project that they were working on. Since then, @shazbot, @ori, @minnieo and I have been hard at work, and we are excited to finally announce the official release of kbin Enhancement Suite (KES)!

kbin has seen an explosion of user-made add-ons, but keeping track of them in one place, letting them share settings with one another, and toggling them on and off can be a challenge. KES is an expandable add-on manager that aims to rectify this by providing a unified interface and framework for script makers to collaborate, and letting you use them all in one place.

KES brings together userscripts from the community, with a built-in settings menu that lets you tailor your experience to your liking. It also offers a flexible framework that empowers script authors to effortlessly integrate scripts into KES and set up custom input fields with no additional code.

KES gives you a single window onto a collection of enhancements that is growing by the day. And those features can be added to by you!

The KES settings menu

What the feed looks like with everything enabled

The comments with everything turned on

Features

We’ve focused on making customizing your kbin experience as easy as possible, whether you are on mobile or desktop. After we sort out the bug reports from this release, we plan on adding many more features! Here’s what we have so far:

  • Collapsible comments with nesting (by @artillect)
  • Use slash commands to add emoticons in text areas (by @minnieo)
  • Add syntax highlighting (with customizable themes) to code blocks (by @ori)
  • Show instance names next to non-local users and communities (by @artillect)
  • Add a link to message users on your instance next to their usernames (by @shazbot)
  • Hide upvote/downvote buttons and reputation (by @artillect)
  • Show more detailed timestamps on threads and comments (by @shazbot)
  • Hide thumbnails on threads (by @shazbot)
  • Add link to subscribed magazines to the navbar (by @shazbot)
  • Replace or hide the kbin logo in the navbar (by @shazbot)
  • Add “OP” label next to thread author’s username in comments (by @shazbot)
  • Convert navigation links on profile pages into a dropdown (by @shazbot)

Each of these can be toggled in the settings menu, and some of them have additional configuration options, such as setting custom labels, colors, etc.

New features are added on a rolling basis and the menu pages will update on the fly to reflect this new content.

Installation

Click here to install KES, and follow your userscript manager’s prompt to complete the installation.

If you don’t have a userscript management extension, you can install one of these, and then install KES using the link above:

Once KES is successfully installed, access the settings menu by clicking on the wrench icon located at the top-right corner next to your username. From there, you can enable the features you like, and customize your browsing experience.

More information

For bug reports and feature requests, visit our GitHub repository’s issues page. If you have any questions or need assistance, don’t hesitate to ask here or make a post on /m/enhancement!

Developers

If you are a userscript author, we’d love it if you could try porting your userscripts into KES, or try writing completely new ones for it! @shazbot has made it easy to integrate your scripts: you just need to add your script’s information to manifest.json, make a few small modifications to your script, add it all to the GitHub repository, and you’re good to go!

KES benefits:

  • Turnkey integration: a simple, declarative framework for dynamically adding features to the UI without touching the underlying code
  • Sharing of user-defined settings through script namespaces: access your script settings, and those from other scripts, through a well-defined object
  • Automatically responds to infinite scroll and page reload events
  • Attribution of script authors
  • Easily toggle scripts on/off

Explore KES’s documentation here to get started. If you have any questions, feel free to reach out here, on /m/enhancement, or at our GitHub repository.

  • ZeeKay@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Greasemonkey on Firefox on MacOS, seems to not really work? The CSS updated slightly but there’s not gear icon in the top right or anything.

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      GreaseMonkey is a bit antique by today’s standards–is it possible to use TamperMonkey? Also, can you provde the OS, Firefox, and GreaseMonkey version numbers? We are trying to reconcile these differences between extensions internally so that the tool is more agnostic to different browser extensions. This is a high priority at the moment.

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This is tentatively fixed and we have it working on all flavors now. The update should be forthcoming over the weekend or start of next week, we are just verifying things.

  • Prouvaire@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Fantastic project and fantastic work.

    For what it’s worth I’d love to see the following userscripts ported to KES:

    • Better Navigation Page - makes the page number at the bottom more readable
    • Kbin Notifications Panel - adds a notification panel to the navigation bar
    • Kbin Subscriptions Panel - adds a collapsible, filterable side panel with a list of all magazine subscriptions (KES has an “Add subs to navbar” option, but the subscriptions panel is a more sophisticated and user-friendly alternative)

    I’m still running these three scripts in addition to KES, but if they were ported to KES it would make managing them easier (via a common interface for options) and reduce the potential for conflicts.

    For example, running Kbin Subscriptions Panel a well as KES produces this visual glitch in the navbar, where the icons get mixed up:

    • McBinary@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Kbin Notification Panel for sure, it’s SO much better than the vanilla notifications.

      I’d like to see @raltsm4k 's Floating Subs List make the cut instead of that Subscription Panel though. Its the same functionally, just more aesthetically pleasing.

    • minnieo@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      notifications panel i’d love to see especially, that has been so useful! i hope @blobcat considers inserting their script (´꒳`)

      • blobcat@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Would love to! I’m trying to figure out how, I’ve never used git much and I’m still really new to doing anything JS related (ㅠ﹏ㅠ)

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Thanks, this is noted, and it seems eminently doable. Is there a particular add-on that is enabled that causes this glitch?

      • Prouvaire@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Thanks @shazbot !

        Not that I’ve been able to identify after toggling various options KES on and off.

        The visual glitch also appears if I disable the Notifications Panel and Better Page Navigation scripts, so it seems to be something in the interaction between KES and Subscriptions Panel.

        If it makes a difference, I use Firefox on Windows with Tampermonkey.

  • Chozo@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I know this is a few days old, but I’m just now seeing this, and wanted to thank you for collapsible comments. This one little addition makes things so much cleaner now!

    Do you know if hiding individual threads from the feed is something that can be added to this, as well? Or does that require an update with Kbin, itself?

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      By hiding threads, are you referring to blacklisting certain types of threads based on a keyword, or are you talking about “cleaning” the thread index by clicking a hide button to wipe it from the view?

          • Chozo@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Yeah, I’m thinking basically the same implementation Reddit has, where you can tap “Hide” on a post, and it’ll disappear after a few seconds and stays gone from your feed.

            • shazbot@kbin.social
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              I’ve been thinking about this. I think I would say: hide posts for the duration of the browser session and localized only to that tab, yes, eminently doable, and they won’t return while you browse around until you exit the browser. But for permanent storage, we have to store the ID of each post in perpetuity, and this will necessarily grow to epic proportions over time as you hide stuff, but there is a small upper bound (5MB) on how much can be retained persistently across all apps. In addition, you’d be carrying around the ID of every post you’ve blocked before and it would be visible to other tabs in your browser, which is a small security concern insofar as it vaguely indicates your preferences. So there is a security and performance negative to this. I don’t think we should retain any such information, only generic information such as on/off states, etc. Hope this is clear.

              • Chozo@kbin.social
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                Pretty sure you could do that locally via cookies without the need for that server load. I think that’s how Reddit’s implementation of hiding posts works, at least.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  edit-2
                  1 year ago

                  There is no server load, I am talking about the equivalent to cookies: sessionStorage and localStorage. Albeit small, the performance drag comes from parsing a growing list of IDs, and the fact that 5MB is shared across the entire browser for all scripts and applications, and the aforementioned security consideration. When I said “we have to store,” I was talking about the localStorage method. Also, KES should never callback to a remote server to store settings, we are against that.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  1 year ago

                  Alright, looked into it some more and I think we can do this using GreaseMonkey’s internal storage, which is private to an atomic script and not accessible elsewhere. I’ll work up a prototype. It will probably work best with infinite scrolling on the thread index enabled.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  1 year ago

                  Good news, got this working as you requested and it is going into the next release. Hides threads on the fly and saves that permanently for later. Also restores previously hidden threads on the page if you disable it, and resets the storage. It works rather well! Need to optimize some stuff, but otherwise it is good to go.

  • blobcat@kbin.social
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I love it! I have one question though, wouldn’t it be better to separate KES version from all of the userscript/settings versions? Updating from 1.1.4 to 1.1.6 only moved the version up in userscript info, since all the userscripts are updated separately anyway. Updating KES would make sense only if something in kes.user.js is changed, right now users just get KES update prompts that do nothing.

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      This is done to force re-cache of the new version of a userscript when it gets added as a feature. MINOR version bumps indicate addition of a mod (userscript) or internal feature, while PATCH version bumps indicate a hotfix. By design in GM, when the version number of the main script is bumped, it will redownload the requisite remote resources. We leverage this functionality to serve new files.

      This should partially be rectified by the addition of the changelog link (flask icon) in 1.2.0.

      When new mods are added to KES, they are integration tested, so bumping the MINOR version does imply some feature change to the KES interaction itself, albeit not necessarily at the code level.

      The userscripts are not updated separately, they are cached once per KES version download. Hope this makes sense.

      • blobcat@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Oh, I guess that makes sense, tampermonkey only allows you to automatically update externals monthly, weekly, or daily (and it’s also a global setting that users need to set) so that would be annoying.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          This is tentatively fixed and we have it working on all flavors now. The update should be forthcoming over the weekend or start of next week, we are just verifying things. We will definitely need your help to test Safari and Userscripts, as this seems to be the most rare combination.

          • Noki@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            I am using safari with userscript, and will give an update as soon as it works.

              • Noki@kbin.social
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                I did the update but still have no wrench, but it’s late for me and I will try tomorrow from scratch.
                I appreciate your work!

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  1 year ago

                  Alright, if you have additional debug output from the dev tools console, that would be helpful. Unfortunately, we don’t have easy access to an iOS test bench at the moment, but I’ll try to read through the Userscripts documentation to see why it might behave differently.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  I don’t have an iOS test bench myself, so I’m not intimately familiar with this, but I believe we have succeeded in implementing a generic, tool-agnostic internal method that ensures compatibility between different versions, based on reference to the GreaseMonkey API. I have confirmed it working on GM/TM/VM, and expect it to work on Userscripts insofar as it implements functionally the same API as GM.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          This is tentatively fixed and we have it working on all flavors now. The update should be forthcoming over the weekend or start of next week, we are just verifying things.

          • DarkThoughts@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            1 year ago

            I already switched to Violentmonkey over the weekend, since Greasemonkey seems to be abandoned for now.
            At least for the previous version I couldn’t really find much use for. Most of the features were sort of worse than the one in my other used scripts. Like the collapsible comments didn’t work with the endless comment scrolling from kbin usability pack and I found the ones from kbin enhancement script just had more usable features that come with it, like collapsing replies and a default collapsed state. Other features didn’t really offer much use. Like hiding the sidebar, which a) also hides the config button and doesn’t really do anything with the empty space, like enlarging the main content to that side.

            Edit: Also, updating to the latest version did not work in ViolentMonkey.

            • artillect@kbin.socialOP
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              Like the collapsible comments didn’t work with the endless comment scrolling from kbin usability pack

              Ooh, I had no idea that was a feature in KUP! I’ll see what I can do to fix that. Should be a relatively easy fix

            • shazbot@kbin.social
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Thanks for your feedback. There is no intentional curation as to what scripts go in, as authors are free to include what they want provided it complies with the framework, so ultimately this becomes a generic place for different features that may or may not suit different people. Other tools may have a more intentional design if they are made by one person. We cannot actively (but nevertheless try to) support other scripts unless the authors are willing to work with us.

              Enlarging the content seems like a good secondary option to add.

              By your last comment, I take it you are referring to clicking the update button and installing the new script over? Have you tried refreshing cache after that?

              • DarkThoughts@kbin.social
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                Yes, I mean the update function of the script manager. I ended up just adding the new version manually from the main site again.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  I have found the issue and it will be fixed in the next security hotfix. Due to the way github handles caching, VM does not update internally when pointing to the raw files, so we must point to the redirect link.

                • shazbot@kbin.social
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  Thank you, I will try to reproduce it and inspect the VM settings to see why it doesn’t auto-update as intended when invoked through the manager itself.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          This is noted, it is a high priority at the moment to support all of the different flavors of extensions.

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I apologize for the inconvenience. This should be fixed in 1.1.3. The update should be available momentarily as a prompt within KES. If you don’t see it, try invoking Ctrl-F5 to refresh cache.

      ViolentMonkey can at times be more idiosyncratic than TamperMonkey in the syntax it expects, and I don’t usually recommend it because I don’t think it has feature parity with TM, but regardless, this issue was my fault for not testing more thoroughly against different extensions.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          We have worked up a more comprehensive fix that provides cross-API support for the different GreaseMonkey implementations found in various browser add-ons. Update should be forthcoming after being stress-tested. As it turns out, there is no truly universal API standard between these tools and they have highly similar, but ultimately different, implementations, so we had to make a shim.

  • donuts@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Very cool. I hope that some of these nice features will eventually be upstreamed/ported to vanilla Kbin, but it’s great to already have a strong community of add-ons. Keep up the great work!

    • artillect@kbin.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Ernest is definitely aware of some of these (he’s been spying on us over at @kbinStyles lol), it’d be great to have them be built in! I love that we’ve got so many people making mods for kbin, it allows you to make things at a super quick pace

  • ChrV@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    Collapsing comments is really smooth and the tap anywhere to collapse is something I didn’t knew I needed. Good job, thank you!

    • artillect@kbin.socialOP
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      Thanks! I worked really hard on that before working on KES, and it was super easy to integrate my script into it

      • Twelph@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        vger.app web app for Lemmy is annoyingly stuttery when collapsing comments, this is much better!

        I’m hoping there will eventually be a kbin update or userscript that allows you to change the text size of comments separately from the rest of the site. The text is too small for me.

        • artillect@kbin.socialOP
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I’m hoping there will eventually be kbin update or userscript that allows you to change the text size of comments separately from the rest of the site.

          That should actually be somewhat easy to do, I just created an issue for it on GitHub. I’m gonna be busy the next few days so I won’t be able to work on it until later, but maybe someone else will beat me to it!

  • McBinary@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I’ve seen a couple prompts to update the script via wrench menu, but the changes don’t seem clear at a glance. Is there a changelog somewhere we can view what has changed?

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      It’s a valid concern, will be doing that going forward once the dust settles. I think it will be an external document rather than a widget inside the menu. You are just seeing custodial changes (hotfixes) to some of the bugs reported today. If the third number is incrementing, it is a hotfix.

      • McBinary@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Thanks @shazbot! That makes sense to keep it external; although I think a static link to an external doc would not be out of place next to the version number on the wrench menu.

        I really appreciate what you guys are doing, these scripts make all the difference in experience on kbin.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          0
          ·
          1 year ago

          Yes, agreed with a link for sure, I just meant that I don’t want to have a fancy widget just for the purpose of displaying the full changelog inside the menu, I think that will be tedious to maintain.

  • effingjoe@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I appreciate the effort, but am curious as to why this is needed in an open source project. I would much prefer these types of things be part of the default experience instead of a third party solution. Is this just my own ignorance showing? Is there a reason to handle this with a third party tool instead of a pull request in the kbin code?

    RES was needed because reddit went closed source and didn’t prioritize the things people wanted.

    Please don’t take my comment as being ungrateful for the great work you’ve done. It’s just an idle question that will probably serve only to demonstrate how little I know. haha

    • artillect@kbin.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Honestly, it’s a great question! While kbin is open source, making userscripts allows you to iterate on changes and get updates out very quickly. It’s also much easier to start making userscripts than it is to contribute directly to the project, since you only really need to be familiar with JS, HTML, and CSS. To contribute to kbin, you need to be familiar with PHP and Twig, and set up your own instance for testing your changes.

      Plus, while kbin is open source, not every single change will be merged, and there will likely always be features “missing” from it. Userscripts also give you a ton of freedom and flexibility in how you use sites, so you could make crazy changes that aren’t remotely possible to merge into it.

      Hope that answers your questions!

    • shazbot@kbin.social
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago

      I think the analogy is akin to hotrodding. Some third party modifications may make their way back to the original manufacturer, but there is always a desire/need among enthusiasts for more outlandish proposals that may not align with the vision of the original maker. Particularly when they involve subjective aesthetic details. If anything, the open-source ecosystem has shown itself to be robust to fragmentation, with 19,000 ways of solving the same problem that are generally interoperable with each other, so I don’t think it’s a bad thing per se, but rather a strength.

      • effingjoe@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Yeah. I guess my concern (perhaps unfounded) is that changes won’t get pushed to the software because there is no presumed need since “the user can already do this with a user script”.

        • shazbot@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          I don’t think that’s ever proven to be the case, sounds more like something cynical that Reddit would do. If it were me, I’d rather focus on actual structural, backend improvements than entertaining the whims of users who want rainbow-colored buttons or dancing emoji. We are talking about utterly trivial changes here like nudging an element here or recoloring an element there. Individually, they are rather pointless, but in aggregate, it can be helpful for a user to dial things in to their liking via a centralized HUD. I still mod every site, game, and every piece of software I use to my liking, that’s just the nature of the beast IMO. Incidentally, I think the owner of the site has been fairly encouraging and accommodating towards our cottage industry of modders!

        • minnieo@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          i wouldn’t worry about that. if anything, userscripts only give ernest and his team the time to focus on more important issues that make sure the site runs properly and quickly, which in turn gets them done faster, so they can get to QOL improvements later on based on our ideas.