OC Kbin Usability Pack 0.4.5 - Bookmarks

Time for a new feature update for KUP. This time I'm introducing bookmarking functionality which adds a new bookmark menu to the toolbar where you can save articles for later.

Note that the bookmarks are saved locally on the device and is mainly designed as a way to keep a reading list rather than a permanent storage of articles.

What is this?

This is a collection of hacks, fixes, enhancements and experiments that I have been tinkering with since I've joined Kbin, neatly packaged into one behemoth of a userscript.




Click on the new bookmark button in the footer underneath each article to save it to your bookmarks.

A new button has been added to the toolbar which brings up a modal with all your stored bookmarks. Click on the checkmark next to the bookmark to remove it.

Compatibility with other scripts

The new bookmarks modal listens to the custom window event "hide-all-modals" for compatibility with other userscripts (like Kbin Subscriptions Panel). Dispatching that event will hide the bookmarks modal if it's open.


  • Fixed undefined magazine name.


  • Improved bookmarks mobile styling.
  • Moved bookmarks menu button to mobile menu for small devices. Tap the hamburger menu to access it.


  • Bookmarks Mobile tweaks.
  • Bookmarks Resetting settings now also resets bookmarks.


  • Fixed auto preview unnecessarily reloading.
  • Fixed compatibility with new version of Kbin where the KUP style settings panel has been ported to the core project.


Fixed numerous bugs related to recent changes in Kbin

  • Fixed broken bookmarks button
  • *Alt UI Fixed broken boost button


Bookmark modal (0.4.0)

KUP 0.4 logo
clb92 avatar

I've found a bug: The article preview buttons disappear after page reloads if bookmarks feature is turned on.

Once they're gone, I can toggle the "show article preview button" twice to get them to show up again, but once the page reloads, they flash briefly and disappear again. If I disable the bookmarks feature, they work as expected.

Perry avatar

Yeah, I found a few more bugs that was introduced as a result of the recent changes in Kbin. I've been away with work last week, but I'll try to look into it in the next coming days.

Perry avatar

Sorry for the slow update! I've fixed quite a few issues, especially related to the bookmarks button, so see if it works better now!

McBinary avatar

Hi @Perry! I have two things to ask about.

  1. It seems like this script doesn't play well with KES. With both enabled, it removes the 'Search' Icon and puts it's functionality on the '+' icon. The old '+' functionality is applied to a duplicate 'Select a Channel' icon, and there is additional highlighted space added to the left of the bookmark icon.

  2. Would you consider integrating this script in with KES? It would be a fantastic addition.

Edit: Brave (chromium based browser) if that matters.

Perry avatar
  1. I think this has already been fixed in KES. They seem to have had compatibility issues with scripts that add icons to the toolbar menu. I was going to look into it today, but as far as I can see, things seem to be working at the moment (except for some overlapping functionality that probably shouldn't be enabled at the same time).

  2. It's a great project they're working on and I don't rule out anything of course, but I feel that it somewhat goes against the very reason why I'm doing this. I see KUP as essentially a personal test bench to try out some new stuff without having to deal with code reviews or CCBs. The end goal is to see what works well and then port that functionality over to the Kbin core project.

As you might have seen, I've already ported parts of the KUP style settings panel to Kbin, and I have some more projects in the pipeline (that is if they are accepted into the project, which is not guaranteed of course).

McBinary avatar

Oh, it does look like it's resolved now. 😁

Perfect! I wasn't aware you were hoping to make these projects core code, but that makes sense! I would love for them to become part of the core software.

Thorned_Rose avatar

@Perry I am experiencing a weird issue with KUP. Here's a screen recording showing it: https://youtu.be/WiOSqIEht1Y

I don't exactly know what's going on other than it's like lazy loaded images are reloading and sometimes loading, unloading and reloading over and over. Sometimes it's just like an image reloads making it look like it's flashing. But on my PC and phone (both with Firefox and Firemonkey and Tampermonkey respectively) it makes Kbin almost unusable because as I scroll down, images will pop out of existence which jumps the posts upwards, losing where I am. To get around it, when I want to tap on an upvote or go to the comments, I have to scroll really carefully so as to not let the image above from unloading.

I was using KUP v3.6 but even updating to the latest, it still has the same problem. :/

Perry, (edited )
Perry avatar

It seems like it’s triggering a reload every time it’s scrolled into view. Might be related to changes in Kbin lately or it’s just my sloppy code. I’ll try to look into it tomorrow.

Edit: This should be fixed in 0.4.4

Aatube avatar

Wow, I just saw this? Do you know if you could add a feature that makes the thread title or something else link to the link?

McBinary avatar

This one is great, thank you for this!

@melroy@kbin.melroy.org avatar

Is there a reason why not include all those features in Kbin directly by submitting a PR :)? That would be ideal, right?

Rhaedas avatar

Absolutely, and that's the hope and goal to have a lot of things in the eventual later versions. But that takes time to roll out, and scripting works for now much faster. The interesting thing is going to be when things mature, both in CSS scripting and Kbin versions, and the collisions of them all. For some stuff it will be just a matter of adjusting to make things look better, but something like this bookmarking or other preferences that build over time may be more problematic if there isn't a way to export.

mizzyc avatar

Hey @Perry! First of all, congrats again for the great work! Ernest should definitely hire you hahaha

I have a question and an UI suggestion:

• Where are the bookmarks stored? I thought it's probably at my browser's cache, so it wouldn't sync between mobile and desktop, right?

• In mobile (at least on Firefox Nightly) the text size of the title and the "No bookmarks" text at the modal looks really huge! My suggestion is to reduce it a little to be more compatible with Kbin's small fonts :)

Perry, (edited )
Perry avatar


  1. They are stored in local storage (essentially cookies) as "kup-bookmarks". You're right, since it's only stored locally on your device, they won't sync between different devices. Potentially, I could try to add a way to at least export the bookmarks, but that would be quite an extensive amount of work to do. As it is now, see it more as temporary "read it later" list than a full-blown permanent archive of articles.

Note that removing bookmarks will also remove them from local storage, so there shouldn't be any trace left behind. Disabling the bookmarks feature will however currently not empty the bookmarks list (it essentially just hides the button), so for maximum privacy, you might want to remove all bookmarks before disabling it if that is a concern. I'll probably add a button to the settings panel to clear the bookmarks later.

  1. That should hopefully be fixed now in 0.4.2!
thegreekgeek avatar

Just a thought, could you possibly work bookmarklets for existing services into the pack somehow? Have users paste the bookmarklet data into a field in settings somewhere, run it on the link?

mizzyc avatar

Potentially, I could try to add a way to at least export the bookmarks, but that would be quite an extensive amount of work to do.

To be honest, to me it looks like too much work for something that's not a crucial feature. I just asked to understand a bit better what you did there hehe

thegreekgeek avatar

Hey, I just enabled this and I immediately noticed a slight bug in mobile (PWA, Firefox Beta), it looks like the page is a titch wider than the screen now? I also have the kbin enhancement pack if that matters.

Perry avatar

Does disabling the bookmark menu in settings fix the issue? It’s probably related to the extra toolbar button making the toolbar too wide on smaller devices.

I’ll look into it.

thegreekgeek avatar

Disabling the bookmarks in settings did fix the issue, currently holding off on reenabling it.

Perry avatar

I've moved the bookmarks menu button to the mobile menu for smaller devices. Tap the hamburger menu to access it.

Not 100% optimal perhaps, but I couldn't figure out a better solution.

thegreekgeek avatar

That totally works, I appreciate the effort! You've knocked it out of the park so far.

thegreekgeek avatar

Figured out what it is, it's unread notification icon/count bumping the width of the toolbar a bit wider than the screen. Present when kbin notification panel is both enabled and disabled.


What a great script! I'm hoping kbin improves with native features like this in the future, but for now I will use your script :)


@Perry @ernest Bônus points if integrated with #Wallabag to bookmark in Wallabag with a specific tag :)

Alexmitter avatar

Would it be possible to add a option which feed sorting method is default? Like defaulting to "new" by default.

L-N-Owhere avatar


FYI, a request for setting a default sort method has been submitted on the kbin-core Issues list

Alexmitter avatar

Yep, my issue.

Perry avatar

Yes and no. It's absolutely possible to do, but the way Kbin is structured the only ways I can think of would be really hacky. This is something that would probably be better fixed in the Kbin project.

Perry, (edited )
Perry avatar

Ironically, I immediately found a small bug when I was going to bookmark this very article. It's not show-stopping, but I'll have a patch out soon.

Edit: This should be fixed in 0.4.1. Apparently my RegEx-game was not on point today, so hopefully I didn't break something else.

Edit2: The modal doesn’t look great in mobile Safari. I’ll get a fix out asap.

Edit3: Safari issues should now be fixed in 0.4.2.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinStyles
  • DreamBathrooms
  • magazineikmin
  • modclub
  • Durango
  • Youngstown
  • rosin
  • khanakhh
  • slotface
  • ngwrru68w68
  • mdbf
  • thenastyranch
  • kavyap
  • InstantRegret
  • tester
  • JUstTest
  • everett
  • normalnudes
  • GTA5RPClips
  • osvaldo12
  • ethstaker
  • cisconetworking
  • tacticalgear
  • anitta
  • provamag3
  • cubers
  • Leos
  • megavids
  • lostlight
  • All magazines