Working around race condition in reddit subreddit themes

So I had an issue where a subreddit was disallowing you to disable showing their theme. So I went in to my preferences and disabled showing themes for all subs. I then accidentally clicked “Show this subreddits theme” on the subreddit (stupidly) which then enabled it and I was then, of course, unable to shut it off regardless of what my preferences were.

So I took to the nerd side

I figured setting this was a function of the API. The way I worked around this was by going in to a subreddit which I could disable/enable themes with no issue and observe chrome console. I finally saw a call to ‘/api/set_sr_style_enabled’ -> right click the call -> Copy as cURL

Paste this to a shell script, change the /r/ in the referrer header and then change the ‘sr_style_enabled=off’ and the ‘r=<subreddit_name>’