I discovered this article that gave some pointers. Turns out people have already written browser extensions for this purpose too.
https://fossbytes.com/block-cryptocurrency-mining-in-browser/
RE: How Starbucks and YouTube Mine Crypto - Programmer explains
You are viewing a single comment's thread from:
How Starbucks and YouTube Mine Crypto - Programmer explains