After the last document we have a preliminary understanding of user scripts, next we introduce how to use Normal scripts in XBrowser through a practical example.
We can add the script to the browser and decide how to execute the script by following the steps below.
We can set the script execution method according to the script application scenario, for this example we set the script execution through the “Toolbox Menu” option.
Click the Save button to save the script and the script list will appear with the scripts we added.
If we set the script execution method to “Tools Menu”, after the script is saved, a new option to execute the script will be added to our tools menu , and the script will be executed after clicking the menu option.
XBrowser supports different execution method for Normal scripts, so we can set different execution methods for scripts according to usage scenarios and user habits.
|Tool Menu||Add options to the browser’s Tools menu for executing scripts|
|Long press menu||Add options to the browser’s Long press menu for executing scripts|
|Main Menu||Add options to the browser’s Main Menu for executing scripts|
|Automatic execution||It is automatically executed when the page is loaded and can be set to execute on any page or at a specific domain.|
The following figure shows the effect of the example script execution options in different menus.