Why is this code not working? I am creating a Firefox extension but the code is not running. But if I paste the code into the console it works
问题 I make a firefox extension that get all the request url's and displays them. But the code only works if I paste it in the console. when the extension loads it doesn't show any error, it seems like it just won't run here is the full code xhrScript.js (function(){ const proxiedOpen = XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function ( _, url) { this.__URL = url; return proxiedOpen.apply(this, arguments); }; const proxiedSend = window.XMLHttpRequest.prototype.send;