Unsubscribing from Reddit Community Notifications

Reddit has been recently ramping up their "Popular post in" and other community notifications. I find these all incredibly low value, and want to turn them off. There's no UI for turning everywhere—just individually per subreddit. But we can do it for all of them with a quick script!