Custom Script Rule
Insert Custom Scripts (Code or External JS) on webpages. Allows you to automate, scrape & change webpage's behaviour with little knowledge of JS.
Requestly brings you one of the most powerful tool which may prove to be replacement for many browser extensions. Using “Insert Scripts” rule, you can make on-the-fly changes to a webpage content.
Inject popular libraries or hosted scripts or execute custom code-snippet before or after page load using simple rule builder.
For example, remove/hide unwanted sections from page, add quick action buttons, add your own libraries to support your script, etc.
Every time the page is viewed, the specified script will be executed and changes will apply, thereby making the user experience seamless. Similar to any other rules in Requestly, Script rules too can be setup to execute on one or more web pages simultaneously.
- 2.Click on requestly icon in browser toolbar or Open https://app.requestly.io/rules
- 3.Click on Add (+) Icon to create a new Rule
- 4.Click on “Insert Scripts” card.
Enter rule name, description and webpage source where the rule has to be applied.
Select libraries (from available options) you want to include in webpage in order to support your custom scripts.
Click “Add Custom Script” button to add custom scripts which can be of two types:
- 1.URL- source of an external script
Each custom script has an option to be either included before page load or after page load. This provides user more flexibility to achieve multiple use-cases.
The extension ensures that firstly all libraries are inserted as custom scripts might depend on them. After libraries, all scripts meant to be loaded before page load are executed and then all scripts meant to be loaded after page load in the same order as they were added in rule builder.
For security reasons, rules created by a user remains private to him/her unless he deliberately shares with other users.