-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Script: Mute #677
base: master
Are you sure you want to change the base?
New Script: Mute #677
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
this css is intended as temporary anyway
moves original/reblogged/all logic to css; moves state logic to control element before timeline
One potential fix for this, I think, is to have two separate storage keys: one for uuid => is this muted or not, and one for uuid => what blog name corresponds to this uuid. Thus, passive updates to the name dictionary cannot overwrite a simultaneous attempt to mute/unmute a blog.
One drawback of this is that the order blogs you have blocked will appear arbitrary; it seems like local storage does not preserve object key order, and so the entries appear sorted alphabetically by UUID, which is sort of weird. edit: in 6cae4f2, I tried: |
This comment was marked as outdated.
This comment was marked as outdated.
...yikes. well, this is why I had that weird CSS way before
This comment was marked as outdated.
This comment was marked as outdated.
Maybe better and arguably simpler-to-understand form of this might be:
In processing, posts are given a special class if muted because they match the current timeline and a generic one if not. Posts with the generic one are always display: Special-class posts are hidden when they are preceded by the warning element. If the mode for the blog in question is "all," special-class posts are hidden with (This really doesn't simplify things all that much, honestly. What we really need is "set this CSS ruleset on elements that match ruleset a unless they match ruleset b, where both a and b can include descendants", but, y'know, that's not a thing afaik.) |
also fixes crash when timelines load without posts yet
I could go either way on this
|
Hmm—I'll probably have to scratch-rewrite some of this again; we'll see. Thinking it might make the most sense to base as much of its logic as possible on Show Originals (such as adding a DOM element to act as a control, even if in this case it's not visible) so that updates to one can be applied to the other with as little work as possible. |
Currently applies to Edit:
|
turns out you should research things.
User-facing changes
This departs slightly from the linked specification in a few ways:
onBlogHiddenClass
).[key, value]
entries instead of in an object. Web extension storage does not preserve insertion order on objects, annoyingly.Does not currently implement a meatball menu button on blogs themselves; see #910.Technical explanation
See comment history.
Also, note that posts are hidden via
visibility: hidden
instead ofdisplay: none
in "hide everything on this blog" mode so that they take up space and Redpop doesn't just try to load posts forever until the tab runs out of memory.Issues this closes
resolves #674