-
Notifications
You must be signed in to change notification settings - Fork 9
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] [Stack Three Columns] Background is white whenusing a dark theme in Firefox + GM #12
Comments
Greasemonkey 4 has many issues, one of them being a sandbox that's hard to work with, especially when one needs to access the actual properties on the native page's I just installed GM 4 in an environment just like yours to check things out, but couldn't reproduce the problem because the first time I don't particularly want to officially support GM 4, but in this case, if you want to use it, it looks like you can inject a script tag into the page containing the userscript's code and it'll work properly. That is, replace: // ==UserScript==
// ...metadata block...
// ==/UserScript==
/******/ (function(modules) { // webpackBootstrap
// ... the entire userscript code ...
/******/ }); with // ==UserScript==
// ...metadata block...
// ==/UserScript==
const userscriptSourceCode = () => { ////// <--- add this
/******/ (function(modules) { // webpackBootstrap
// ... the entire userscript code ...
/******/ });
}; ////// <--- add this, and add the below line
document.body.appendChild(document.createElement('script')).textContent = '(' + userscriptSourceCode.toString() + ')();'; |
That's alright. I am OK with using another script manager. The main reason I used GM is because I had it installed since ages ago. But I do see that it is overly restrictive nowadays. I am fine with moving over to Violentmonkey. Not a fan of Tampermonkey since it went close sourced. I am happy for the issue to be closed with the workaround for using a different userscript manager and the code change above. |
Which userscript
Stack Three Columns
Describe the bug
When using Greasemonkey and the dark theme for Stack Overflow, the three column edit view that opens has a white background which makes many elements hard to read.
To Reproduce
Steps to reproduce the behaviour:
Screenshot
Expected behavior
The three column layout to be dark. Preferably recognising the theme used the site.
Environment (please complete the following information):
Additional context
The issue is somehow connected with how Greasemonkey handles the script. Most likely something to do with the isolation it applies. The issue doesn't show up in Tampermonkey (tested in ChromeVersion 75) nor in Violentmonkey (tested in Firefox 77).
The script is using
background-color: var(--white);
here . This matches the declaration the following rule from primary.css:Where the the
--white
is defined in stacks.css:So, the
--white
should work and it does in other userscript managers, however GM has a different handling of styles from the userscript with regards to styles on the main site.I don't know if there is an easy fix for this. My current workaround is to just use Violentmonkey for this script
The text was updated successfully, but these errors were encountered: