XKit-Rewritten icon indicating copy to clipboard operation
XKit-Rewritten copied to clipboard

Investigate and improve on-update behavior in Firefox (again)

Open marcustyphoon opened this issue 1 year ago • 2 comments

Concept

With the release of v1.0.1 to Firefox, I'm seeing various reports that the features silently stop working until you refresh/open a new tab. Reports include the radar hiding tweak, hide my own posts on the dash tweak, possibly No Recommended sidebar hide...

Unfortunately, to my knowledge, all of these work fine when you simply toggle the extension off and on in Firefox; hopefully this isn't impossible to reproduce in development. If it is possible to reproduce in development, we can probably(?) fix it. For example, maybe the script element used to initialize the main world handlers needs to not have type: module or something, since module scripts don't get executed for side effects multiple times. Ah, damn, that's probably it, isn't it.

(Wait... I guess one can just reproduce this by installling the 1.0.0 xpi, opening Tumblr, then firing the update in a new tab. Nice. How one can test a fix, I'm not so sure.)

marcustyphoon avatar Jul 18 '24 06:07 marcustyphoon

Aside: Oh, hey, toggling the extension duplicates the Quote Replies action button. Only the new one works, since we attach the listener directly to the element, so it's not like a check that a button already exists would help in this case; we need to remove it.

Perhaps we should add element.dataset.xkitRewritten = ''; to the dom util and just get rid of everything, not just buildStyle style elements, on boot. Clutters the dev tools, though.

marcustyphoon avatar Jul 18 '24 07:07 marcustyphoon

This issue is unconfirmed, and has been labelled as stale due to inactivity. It will be closed automatically if no further activity occurs.

A project maintainer can mark an issue as confirmed by adding the help wanted label, the wontfix label, or an assignee.

stale[bot] avatar Aug 18 '24 11:08 stale[bot]