Purplemonkey 作者: gholk
实验性实验性
可在 Android™ 版 Firefox 上使用可在 Android™ 版 Firefox 上使用
一个开源的用户脚本管理器,支持很多浏览器
您需要 Firefox 来使用此扩展
扩展元数据
关于此扩展
# Purplemonkey
Just like [Violentmonkey], but with more unsafe API.
[Violentmonkey]: https://violentmonkey.github.io/api/gm/
## Purplemonkey API
only the additional api from violent monkey are listed.
other api are same to the violent monkey in the same version.
### GM_messageExtension(id, payload)
send message to other extension's `browser.runtime.onMessageExternal` handler.
* id: the id of the destination extension.
* payload: the data to send. must be structure clonable.
* return: a promise resolve to the response or reject to error.
to use this api, you have to add `@connect web-extension://id`
in the userscript's meta field.
where id is the extension that you want to send message with.
the special `web-extension://*` allow to connect to all the other extensions.
### GM_webextEval(code, args)
eval string or function in violent monkey background script.
* String(code): the code is call as
`(function (...args) {return eval(code)})(...args)`,
so the last statement is return.
* Function(code): code is stringify and reconstructed as function in background.
stringify so any closure will not work.
if this is a method, you should make sure that it could be stringify
and reconstruct correctly.
async could work.
* args: an argument array that structure clonable.
* return: a promise resolve to result or reject to error.
Just like [Violentmonkey], but with more unsafe API.
[Violentmonkey]: https://violentmonkey.github.io/api/gm/
## Purplemonkey API
only the additional api from violent monkey are listed.
other api are same to the violent monkey in the same version.
### GM_messageExtension(id, payload)
send message to other extension's `browser.runtime.onMessageExternal` handler.
* id: the id of the destination extension.
* payload: the data to send. must be structure clonable.
* return: a promise resolve to the response or reject to error.
to use this api, you have to add `@connect web-extension://id`
in the userscript's meta field.
where id is the extension that you want to send message with.
the special `web-extension://*` allow to connect to all the other extensions.
### GM_webextEval(code, args)
eval string or function in violent monkey background script.
* String(code): the code is call as
`(function (...args) {return eval(code)})(...args)`,
so the last statement is return.
* Function(code): code is stringify and reconstructed as function in background.
stringify so any closure will not work.
if this is a method, you should make sure that it could be stringify
and reconstruct correctly.
async could work.
* args: an argument array that structure clonable.
* return: a promise resolve to result or reject to error.
为您的体验打分
权限详细了解
此附加组件需要:
- 输入数据到剪贴板
- 为您显示通知
- 存取浏览器标签页
- 无限量存储客户端数据
- 存取您在所有网站的数据
更多信息
添加到收藏集
2.20.0 的发布说明
add unsafe api
gholk 制作的更多扩展
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分
- 目前尚无评分