You can install Page Manipulator in Google Chrome. And not just Chrome, but it will work in any Chromium based browser such as Microsoft Edge, Opera, and Brave.
After installing it, you can just enable and then, from the main screen, choose what you want to do. There are separate options to inject the code. For example, in this post of mine, I will be injecting a JS code. So, select the JS option.
It will ask you to create a file and then will open the code editor. You can start writing the code and then after you are done, simply configure the rules. Add the URLs in the list to specify on which websites, you would like to inject the snippet.
Finally, hit the Manipulate button and it will immidiately insert the JS into the currently opened website. The script that you inject will run immediately, and you don’t even have to reload the page or take any action. See it in action in blow. I have injected an “Install” button on the AUR page using a very short script.
If you are looking for a tool to dynamically inject code into websites, then you are at the right place. Just use the Chrome extension I have mentioned here and do that like a pro. It is really a useful tool to test new features or functionality on various website without making changes to the source code.