I have a library of JavaScript functions that I want to be able to access from the developer console of a web browser. I want to be able to run my functions side-by-side with the functions and variables defined by the webpage.
One solution I see is simply copy/paste'ing the code directly into the browser console and then using it, but it would be better if there were a more elegant solution, especially because my codebase could grow a lot and I don't want to have to copy/paste every time I load.
Another solution I looked into was using Chrome Extensions. Chrome Extension Content Scripts (https://developer.chrome.com/extensions/content_scripts.html#host-page-communication) allow JavaScript code to automatically run on visits to webpages, however the above webpage states that
"[Content scripts cannot] use variables or functions defined by web pages or by other content scripts."
Is there any other way of accomplishing this?
Thanks for the help!