Reddit Toggle Custom CSS

Persistently disable/re-enable custom subreddit styles via a userscript command

< Feedback on Reddit Toggle Custom CSS

Review: Good - script works

§
Posted: 18-05-2019

Enable by default?

Instead of the toggle, can this script disable custom CSS by default?

chocolateboyTác giả
§
Posted: 18-05-2019

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.

chocolateboyTác giả
§
Posted: 18-05-2019

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.

Post reply

Đăng nhập để bình luận