sindresorhus/refined-github

`clean-discussion-sidebar` isn't re-applied after changes to the sidebar #2333

fregante posted onGitHub

  1. Visit an issue
  2. Post a comment or add a label
  3. Notice that the sidebar is dirty again

asd

There should either be an even listener on the ajaxed element (it's probably called socket:message) or a MutationObserver


It tries to observe .discussion-sidebar (which is no longer available). https://github.com/sindresorhus/refined-github/blob/2e4a24d3957c205c7bc49525c69e1fa08593d2ca/source/features/clean-sidebar.tsx#L79 I wonder if simply changing it to observe #partial-discussion-sidebar instead would be enough to fix it. Looks like the answer is no...

posted by sharkykh over 5 years ago

I wonder if simply changing it to observe #partial-discussion-sidebar instead would be enough to fix it. Looks like the answer is no...

So in that case this also won't work? https://github.com/sindresorhus/refined-github/pull/2336

posted by fregante over 5 years ago

Good point. I just tried #2336 again, and after the sidebar is updated, the button is gone. That's unfortunate.

posted by sharkykh over 5 years ago

FYI, this works for #2336.

        observeEl('#discussion_bucket > :last-child', addMarkUnreadButton);

Actually, this solution can be used to fix this issue (#2333) as well. https://github.com/sindresorhus/refined-github/compare/master...sharkykh:fix-clean-sidebar

However, I remembered this conversation.

posted by sharkykh over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests