-
Notifications
You must be signed in to change notification settings - Fork 351
Description
Description
I was working on a userstyle and when I saved it, I got a popup saying something like the style had changed and asking if I wanted to reload it. I didn't know why it would have changed, so I clicked no and continued working on it. Then that kept happening when I saved it, so I tried clicking yes and when it reloaded, it was gone.
Thankfully I have a copy.
Note: I can't remember now if there was an error or if it was a blank editor. Firefox's history doesn't seem to track extension pages.
When I checked the Stylus dashboard, I noticed that a sync was happening and seemed to be stuck. After a few minutes it said something like the database was currently in use and the lock would expire in an hour. I'm guessing a sync happened in the background while I was working on the style, and there was a hiccup between Stylus and my Dropbox account, and that's why the style got deleted, but it's only a guess. This isn't my field.
Sidenote: I paused syncing on my PC Dropbox in order to make a copy. I do have my userstyles in a Git repo, but I've been lazy about keeping it updated so I've been relying on the sync.
I found the relevant userstyle JSON in my Dropbox, but when I try importing it, nothing happens. The style doesn't get imported but no error appears, not even in the browser console.
I'm guessing the import can't handle this file format and there's no error because this situation was unanticipated.
I tried clearing the lock, and the sync went through, but now the file is just a stub containing {"_rev":1773527561364}. That number is the timestamp in milliseconds UTC (2026-03-14 22:32:41.364), and seems to be either when the style was last edited or when the sync went through.
How do I recover from here when I can't import the JSON?
Or is the import supposed to work?
Can I replace the stub with the copy and then it'll sync properly?
I could parse the JSON with Python, but the CSS is in four sections each with different domains, so it would be arduous to re-enter everything.
I guess I could parse it back to Mozilla format, but I have to imagine there are already tools that can do that.
System Information
- OS: Debian Linux
- Browser: Firefox 148.0
- Stylus Version: 2.3.19
Screenshots, links, CSS
(I don't think I have anything useful to put here.)