Skip to content
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

[BUG] The site-toggle button randomly stops working on certain sites. #5859

Closed
bonecountysheriff opened this issue May 20, 2021 · 8 comments
Closed
Labels

Comments

@bonecountysheriff
Copy link

bonecountysheriff commented May 20, 2021

Bug Report

Describe the bug

Darkreader sometimes automatically disables itself for certain sites which were working previously. It reads "Disabled for current website". Pressing the site-toggle button does nothing. I'm not sure if it's just me.

Basically, $('.site-toggle').click() does nothing.

Right now, I'm seeing this behavior https://codeforces.com in the brave browser.

Steps to reproduce

  • Start brave browser
  • Go to codeforces.com
  • Try enabling darkreader using the site-specific (not global) button

-- or --

chrome.runtime.connect({name: 'ui'}).postMessage({type: "toggle-url", data: "https://codeforces.com"})

Run this on darkreader's console.

Expected behavior

Dark mode

Actual behavior

Dark mode disabled, cannot enable. Pressing the site-toggle button doesn't toggle it.

Screenshots

System Information

  • OS: linux
  • Browser: brave
  • Dark Reader Version: 4.9.32

Additional context

@bonecountysheriff
Copy link
Author

bonecountysheriff commented May 20, 2021

chrome.runtime.connect({name: 'ui'}).postMessage({type: "toggle-url", data: "https://codeforces.com"})

Running this on darkreader's console does nothing.

@bonecountysheriff bonecountysheriff changed the title [BUG] The enable button randomly stops working on certain sites. [BUG] The site-toggle button randomly stops working on certain sites. May 20, 2021
@ghost
Copy link

ghost commented May 20, 2021

Not reproducible on firefox, can't bother to download brave because chromium browsers tend to crash 99.999% of the time 😔

@Gusted
Copy link
Contributor

Gusted commented May 20, 2021

I don't really see anything why this shouldn't other then that you already have a entry in your sitelist that is conflicting with this site.

@bonecountysheriff
Copy link
Author

bonecountysheriff commented May 20, 2021

Even if the entry was present, wouldn't it be removed when the button is toggled?
In my case, the button doesn't change state at all.

One more thing. If enabled by default(in the settings menu) is disabled, the site starts to obey darkreader. This time the site-toggle button stays enabled instead of disabled. And like before, pressing the site-toggle neither changes the state of the button, nor the site.

So I'm guessing the problem is with the button itself and not a css glitch.

@Gusted
Copy link
Contributor

Gusted commented May 20, 2021

Even if the entry was present, wouldn't it be removed when the button is toggled?

Not really, it might be conflicting but it won't be removed when the button it's toggled.

Could you send over the sites you have in your list? Or see if you think anyone of them is causing this problem as it could be matching the same domain.

@bonecountysheriff
Copy link
Author

Apparently putting <prefix> in the sitelist causes this behavior for <prefix>*. I think this should be a bug, but I'm not sure if the maintainers would agree. Anyways, problem seems to be solved.

@Gusted
Copy link
Contributor

Gusted commented May 21, 2021

#147

@Gusted Gusted closed this as completed May 21, 2021
@Francewhoa
Copy link

If you're facing this challenge on a subdomain, it is likely a bug

This is to confirm this bug on subdomaines with Dark Reader V4.9.62. Using Firefox V102.7 or Ungoogle Chromium V109.0.

For users facing this challenge on subdomains, I published this easy, quick, and temporary workaround.

For developers interested to contribute to resolving this bug, you might be interested in this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants