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

Dark theme doesn't run for forum reply fields. #9

Open
VFDan opened this issue Jul 26, 2020 · 6 comments
Open

Dark theme doesn't run for forum reply fields. #9

VFDan opened this issue Jul 26, 2020 · 6 comments
Assignees
Labels
Confirmed help wanted Extra attention is needed

Comments

@VFDan
Copy link
Owner

VFDan commented Jul 26, 2020

image

Since it is an iframe, https://stackoverflow.com/a/7571138/ might be helpful.

@VFDan VFDan added Confirmed help wanted Extra attention is needed labels Aug 10, 2020
@VFDan VFDan pinned this issue Sep 4, 2020
@MiniCoder11
Copy link
Collaborator

I've partially fixed this. The white background of the main preview field will now be consistent with the main color palette. There still is no easy way to modify the iFrame contents without jQuery due to the Cross-Origin policy.

@MiniCoder11
Copy link
Collaborator

@VFDan I do not think there is any "proper" way to fix this without bypassing security restrictions using unintended exploits. Scratch users may not feel safe with solutions that expose the contents of their webpages in such ways. Should we close the issue and declare it as "won't fix" for now?

@VFDan
Copy link
Owner Author

VFDan commented Oct 28, 2020

Can't we just do jQuery then, if that's the last option besides exploits? What we should do is put all the styles in seperate documents, then instead of calling every style we just append the document to the page. https://stackoverflow.com/questions/583753/using-css-to-affect-div-style-inside-iframe/7571138#7571138 is how we can easily add the style to the iframe, and I wouldn't call that an exploit.

@MiniCoder11
Copy link
Collaborator

We could, but then wouldn't we would be going beyond the limitations of a userscript? Once multiple files become involved, we would need the user to perform the installation of several files to get the dark theme to work. If we are using only one file, then I think we should do the rewrite for #12 first so that the style can apply to iframes by the time they load.

@VFDan
Copy link
Owner Author

VFDan commented Oct 30, 2020

Nope, we don't need the user to install multiple files. We just do direct links to the files.

@MiniCoder11
Copy link
Collaborator

Okay, sounds good : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants