'Code that blocks website from opening new tab

I'm using a proxy, but I have a problem. On some websites, random popups open new tabs, and I was wondering, since Chrome Web Store is blocked and I can't install any software, if there's any code I can implement in my proxy to disable it from opening any new tabs. I've looked around and I can't find any way to do this. What I want to do is implement a toggle slider that lets you disable or allow the proxy from opening new tabs. However any way of disabling the proxy from opening new tabs with just code, even if it is not toggleable is fine. Any help would be appreciated because I'm not sure where to start, thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source