你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/23434-reddit-toggle-custom-css/discussions/23176,源站連結 點此以跳轉。
Persistently disable/re-enable custom subreddit styles via a userscript command
< 脚本 Reddit Toggle Custom CSS 的反馈
How would you know which subreddits have themes to enable if you disabled them by default?
I suppose I could add this as an option if this was an addon, but there's no nice way of adding a preference page for userscripts.
However, you can do it yourself by editing the script (e.g. by clicking the script's edit button in Violentmonkey) and changing the line that reads:
const disableCss = GM_getValue(SUBREDDIT, false)
to:
const disableCss = GM_getValue(SUBREDDIT, true)
You may need to reload the page for the change to take effect.
Note: if you're logged in, you can disable custom styles by default via: Preferences -> display options -> allow subreddits to show me custom themes, but Reddit doesn't provide a built-in way to toggle them back on on a per-subreddit basis.
I've just pushed a new version (1.2.0) with a separate value for the default state, so you can change it by replacing:
const DISABLE_CSS = false
with:
const DISABLE_CSS = true
Toggling the style on should now take effect immediately.
Enable by default?
Instead of the toggle, can this script disable custom CSS by default?