Skip to content

About

Here are some user script examples to demonstrate the Grease Monkey scripting API supported by XBrowser. You can learn how to use Grease Monkey script to extend the functionality of XBrowser.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

title 用户脚本API示例
date 2022-05-28 10:59:35 -0700

此脚本用来展示 油猴脚本API的使用方法,包含了大部分GM函数使用方法代码示例。我们可以通过运行这些例子来了解这些API的使用方法和特性。下面分别介绍如何在X浏览器和Chrome中运行测试脚本。

在X浏览器中运行示例脚本

  1. 确认X浏览器版本为3.7.8及以上版本,可以直接在X浏览器中打开脚本源码URL自动安装。

image-20220603161822323

  1. 打开 https://www.example.com 页面准备测试。

脚本成功运行后您看到的网页是这样的。

  1. 同时X浏览器的页面工具菜单会新增多个选项作为测试每个API函数的入口,如下图所示。

image-20220603171740730

在Chrome 中运行示例脚本

  1. 我们假定您的Chrome中已经安装了油猴(Tampermonkey)扩展,打开管理面板, 切换到"实用工具标签"。 选择"从URL安装" 。

  2. 脚本安装成功后同样打开 https://www.example.com 页面。

脚本运行成功后您看到的网页时这样的

image-20220604092917721

  1. 点击油猴扩展您会看到油猴脚本的测试选项。

image-20220604093318432

About

Here are some user script examples to demonstrate the Grease Monkey scripting API supported by XBrowser. You can learn how to use Grease Monkey script to extend the functionality of XBrowser.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages