You can open a browser's Dev-Tools on any page and write & run JavaScript-Code in the console.
However I now need to run ("inject" into an existing page) JavaScript code that is about ~5 million characters in length. The browser really can't handle if I copy-paste that into the console, like I'd do with smaller code snippets - it freezes for 30+ minutes.
I think the only reason it struggles is because it's trying to display all of that code.
Therefore, if I could just load the code directly from a local file, without it being displayed in the console, it should work flawlessly.
How can I do that?
(On any browser, but Firefox primarily)