I wrote a script I use on an e-commerce site where hundreds of products are added in largely random order throughout the day. The product SKUs just happen to be in data-* HTML attributes, so I chuck them into an array that gets stored in localStorage. On each subsequent refresh, any product with a SKU that wasn’t seen previously gets a CSS background applied to its container, and is moved to the top of the listing. The new items’ SKUs are merged back into the locslStorage array, ready for the next refresh.<p>There are also category listings on the side of this page that include a count of the items in each category, so I store those values in localStorage as well, and compute the delta on each refresh. The category is then highlighted with a pale green or pale red background if the count increased or decreased, respectively. Finally, I append the delta amount to the element’s text. “Widgets and Frambulators (17)” turns into “Widgets and Frambulators (17) (+5)” if five new items are in that category since the last page load.<p>Thankfully, this site uses CSS Grids for this particular product listing, so moving a container to the top is as simple as setting its order property to 1.
write full blown extensions (with the help of ChatGPT) instead of using tampermonkey.<p>the two that I have are inline hacker news commenting, and Amazon item descriptions in my gmail instead of just the order id
I once wrote a tampermonkey script to page through discord search results, scrape the contents, and post them to a local http server. I managed to scrape the most of the contents of an entire server this way without any API access. That would have basically been impossible to do without a userscript.<p>There's also the script I use to send me a desktop notification (again, by pinging a local http server) whenever I've been spending too much time on Twitter. That's saved me hours in a different sense.
I used to heavily augment (don't have the scripts anymore though) Tribal Wars (a web game) with features to compute army travel times, automate build queues etc.