
Purplemonkey2 wót gholk
EksperimentelneEksperimentelne
Za Firefox za Android™ k dispozicijiZa Firefox za Android™ k dispoziciji
Just like Violentmonkey, but with more unsafe API.
Trjebaśo Firefox, aby toś to rozšyrjenje wužywał
Metadaty rozšyrjenja
Wó toś tom rozšyrjenju
# 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.
Pógódnośćo swóje dožywjenje
PšawaDalšne informacije
Toś ten dodank musy:
- Daty do mjazywótkłada kopěrowaś
- Powěźeńki na was pokazaś
- Pśistup k rejtarikam wobglědowaka měś
- Pśistup k wašym datam za wšykne websedła měś
Dalšne informacije
- Dodankowe wótzkaze
- Wersija
- 2.20.0
- Wjelikosć
- 2,02 MB
- Slědny raz zaktualizěrowany
- 9 moannen lyn (21 jul. 2024)
- Pśiswójźbne kategorije
- Licenca
- Licenca MIT
- Wersijowa historija
Zběrce pśidaś
Wersijowe informacije za 2.20.0
add unsafe api
Wěcej rozšyrjenjow wót gholk
- Hyšći pógódnośenja njejsu
- Hyšći pógódnośenja njejsu
- Hyšći pógódnośenja njejsu
- Hyšći pógódnośenja njejsu
- Hyšći pógódnośenja njejsu
- Hyšći pógódnośenja njejsu