Додаци за прегледач Firefox
Пријавите се
Преглед Purplemonkey2

Purplemonkey2 од gholk

Just like Violentmonkey, but with more unsafe API.

ЕксперименталноЕкспериментално
3 (1 рецензија)3 (1 рецензија)
32 корисника32 корисника
Преузмите 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.
Оцењено са 3 од стране 1 рецензента
Пријавите се да бисте оценили овај додатак
Још увек нема оцена

Оцена звездицама сачувана

5
0
4
0
3
1
2
0
1
0
Прочитајте 1 рецензију
Овлашћења и подаци

Потребна овлашћења:

  • Унос података у оставу
  • Покажите обавештења
  • Приступи језичцима прегледача
  • Приступ подацима за све веб странице
Сазнајте више
Више информација
Везе додатка
  • Почетна страница
  • Страница подршке
  • Копирај ИД додатка
Издање
2.20.0
Величина
2,02 MB
Последњи пут ажурирано
pre 2 godine (21. jul 2024.)
Повезане категорије
  • Веб програмирање
Дозвола
MIT дозвола
Историјат издања
  • Погледајте сва издања
Додај у збирку
Пријави овај додатак
Идите на почетну страницу Mozilla-е

Додаци

  • O програму
  • Блог о додацима за Firefox
  • Радионица за додатке
  • Центар за програмере
  • Политике програмера
  • Блог заједнице
  • Форум
  • Пријавите грешку
  • Водич за оцењивање

Преузмите

  • Download Firefox
  • Windows
  • macOS
  • iOS
  • Android
  • Linux
  • All

Најновије градње

  • Nightly
  • Beta

Firefox за предузећа

  • Enterprise

Заједница

  • Connect
  • Contribute
  • Developer

Прати

  • Instagram
  • YouTube
  • TikTok
  • Bluesky
  • Podcast
  • Приватност
  • Колачићи
  • Права

Изузев тамо где је другачије наведено , садржај на овој страници је лиценциран под Creative Commons Attribution Share-Alike дозволом v3.0 или било којим каснијим издањем.