darkreader / darkreader/darkreader
Styles are not correctly switched. Error CORS
- Dominant language
- TypeScript
- Stars
- 22.4k
- Forks
- 2.7k
- Avg merge
- 21h 11m
- Merged PRs (30d)
- 78
Description
Hello! Thank you for your work and your library!
But I have some problem and I wanted to ask a question :
I have page. some things on page made with ExtJs. Some styles are connected remotely - ``.
I used `DarkReader.setFetchMethod( window.fetch )`.
When I activate the theme not all styles are processed:
Then I decided to add headers:
```
window.DarkReader.setFetchMethod( fetcher );
function fetcher( url, options ) {
return window.fetch( url, updateOptions( url, options ) );
}
function updateOptions( url, options ) {
if ( typeof options === 'undefined' ) {
var options = {};
}
options.mode = 'no-cors',
options.headers = {
'access-control-allow-origin': '*',
}
return options;
}
```
And I stopped getting CORS mistake. But the result has not changed. Styles still do not switch to a dark theme.
For the test, I set the expansion for the browser and decided to check everything works well
Is it possible to make styles displayed correctly?
What could be the reason?
Thanks in advance for the answer
Contributor guide
Assessment
This issue has not been assessed yet.