Greasy Fork is available in English.

Reddit Toggle Custom CSS

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

< Commentaires sur Reddit Toggle Custom CSS

Avis: Bon - le script fonctionne correctement

Posté le: 18/05/2019

Enable by default?

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

Posté le: 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)


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.

Posté le: 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


const DISABLE_CSS = true

Toggling the style on should now take effect immediately.

Poster une réponse

Connectez-vous pour poster une réponse.