ankit/stylebot

[Bug] Reload button required to be click on every pageload

ianrandmckenzie opened this issue · 0 comments

Describe the bug

When I use styles on Twitter, YouTube, and all other sites, this extension works perfectly! However, on Discord.com/app, I have to click the "Reload" button in the extension menu every time I go to the website. This is not expected behavior.

Browser

1.46.144 Chromium: 108.0.5359.128 (Official Build) (arm64)

To Reproduce

Steps to reproduce the behavior:

  • Go to https://discord.com/channels/@me (requires a Discord account login)
  • Join a public server from the Explore menu if you're on a fresh account
  • Use this as your stylebot CSS:
nav[aria-label="Servers sidebar"] { display: none; }
  • With this CSS, the server menu will be hidden
  • Leave the page and return, the servers menu is no longer hidden and you have to reload the extension on the page every time you open the website in a new tab

Expected behavior

The servers list should be hidden every time I navigate to the website, no matter how I navigate to the website

Screenshots

(Black boxes are to protect privacy)
Image on fresh page load with CSS rules already in place:
Screen Shot 2022-12-31 at 1 07 20 PM
Image with CSS rules properly loaded after clicking reload button:
Screen Shot 2022-12-31 at 1 07 27 PM

Additional context

This bug does not appear to happen once you are already on Discord and have the extension reloaded after clicking the extension's reload button.