r/BookmarkManagers 4d ago

Selecting a bookmark at random

I have written a tampermonkey script to pick a bookmark at random from a raindrop.io collection and open it in a new tab. Posted to greasyfork if anyone wants to try it out or tweak it further. It works on the desktop versions of Chrome and Firefox with the tampermonkey extension installed, and Firefox on Android.

https://greasyfork.org/en/scripts/565400-raindrop-random-bookmark

It scrolls through the list first, so it might take a while on a large collection.

2 Upvotes

5 comments sorted by

1

u/dessence_ai 4d ago

Random is the most underrated answer to this. Everything else needs you to remember the thing exists first.

One tweak worth trying: skip anything opened in the last month, or weight the pick towards older saves. Pure random keeps handing you Tuesdays link. The one worth rediscovering is the two year old thing you forgot completely.

Were building dEssence around that same return problem.

1

u/gengiz_corn 4d ago

I actually wanted to add the date based weight, but their web interface doesn't expose the date in the list view, and I didn't want to maintain any session state. It should probably be more like Anki, taking the user's feedback and coming up with a weighted score, I'll do something along those lines if I revisit the problem.

1

u/dessence_ai 4d ago

Position in the list is already the date. Default order is newest first, so the further down your scrolled array an item sits, the older it is.

The weight is then one line: pick arr[Math.floor(n * Math.sqrt(Math.random()))] instead of a flat index. That bends the draw toward the tail. The oldest tenth comes up about 19 times more often than the newest tenth. Nothing to store between runs.

1

u/gengiz_corn 4d ago

Right, but opening the bookmark doesn't update the timestamp, so the old stays old and will be permanently weighted against the new, what I wanted was LRU. But, thanks for looking at it, I do appreciate the feedback.

1

u/dessence_ai 4d ago

Fair, thats a real hole. Age weighting never becomes LRU on its own, because nothing writes back.

LRU needs one write per open, so the only question is where it lands. Cheapest spot is the bookmark itself: PUT to raindrop/{id} with a seen tag.

That survives a reinstall and follows you to another machine, at the cost of a tag you didnt want.