Content Overrides
Overrides are a way to test/execute changes without modifying source code. Overridden files are saved in a local folder and served from there for subsequent requests.
In order to use this,
- Select a folder on local machine for chrome to save the modified version of files
- Once chosen, edit any file and hit CMD/Ctrl + S to save the file to overrides folder
Once the file is saved, reload the page so that chrome can use the overridden file on page load. This can help you to modify and test code right in production before pushing out a fix.
Try
- Open sources tab in devtools
- In the left pane, choose
Overrides
and select a folder to enable it - Navigate to
3-content-overrides.js
file - Modify the
Hello from JS
text that is being displayed on button click and save the file (Ctrl/Cmd + S) - Click on the button below to check whether your changes were applied
- Refresh the page and try again to ensure the overrides are saved