StylishThemes / GitHub-Dark-Script

Archived - Please use https://github.com/StylishThemes/GitHub-Dark directly
https://greasyfork.org/en/scripts/15562
MIT License
550 stars 51 forks source link

Jupyter notebook stays black when script is disabled #68

Closed veliona closed 5 years ago

veliona commented 5 years ago

Hi, I found the reproducible issue that happens while browsing with DarkScript toggled off on Jupyter notebooks. Even if the DarkScript is off, Jupyter Notebooks remain themed in black. Might be related to #56

Screenshot 2019-08-15 at 09 03 49 Screenshot 2019-08-15 at 09 04 01

Mottie commented 5 years ago

Hi @veliona!

Hmm, that's going to be a troublesome, or nearly impossible, fix.

To apply the style, we have two separate userscripts running on github.com and the iframe of render.githubusercontent.com. Since the iframe is on a different domain, there isn't any way to perform cross-domain communication.

Mottie commented 5 years ago

If you really need to constantly enable/disable the style, then I would suggest switching to use Stylus and our GitHub userstyle.

veliona commented 5 years ago

Thank you for your response @Mottie! :)

Feel free to close the issue if you think that it's not worth the trouble and thanks for the suggestion.

silverwind commented 5 years ago

Yes, I think this is unsolvable via regular means. There are ways to communicate with an <iframe> but to my understanding, if said <iframe> is properly sandboxed, these methods will not work. So yeah, you would have to use the userstyle version to fix this (or simply reload the page).