Using Requestly’s Insert Scripts Rule, you can make on-the-fly changes to a webpage content. It allows you to automate, scrape & change webpages behaviour without needed to access the page source code.
- Inject popular libraries or hosted scripts or execute custom code-snippet before or after page load using a simple rule builder.
- Give custom theme to Twitter or any other website. Remove/hide unwanted sections from the page.
- Debugging CSS (see example below).
Use Requestly browser extension to insert script before page load
To insert script before page load you can use Requestly’s Insert script rule.
- Install Requestly’s browser extension.
- Click Create your first rule and go to Insert Script and click Create Rule.
- Enter the source URL condition.
- Source Condition: Source condition is where you set criteria for the rules. You can use
Equalsto match the source request. Learn more about source conditions here.
- Script Language: The specific script language (JS/CSS) that needs to be inserted.
- Script Source: Source Code or URL of the script that needs to be inserted.
- Script Load Time: When is the script loaded in the webpage. (Before Page Load/After Page Load)
See below example for inserting custom CSS before page load: