I’ve found great benefit in using the times when I have high willpower and problem-solving energy to put things in place that will help me when willpower is low. The biggest win I think is noticing that I was staying up too late reading/playing on my phone, and so installed an app that locks my phone after a certain time at night. (“Digital Detox Challenge” is the most effective app I found for this on Android.)
I’ve also found that modern LLM chatbots are surprisingly good at helping find solutions to problems you might not expect.
Judging from the way Autocard Anywhere works (a popular browser extension for showing images of trading cards, like MtG cards, on mouseover of their names), the way to do it is to have a whitelist or blacklist of websites on which the extension should apply. Probably also in conjunction with a blacklist of specific protein names like THANK.