Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of Purplemonkey2

Purplemonkey2 by gholk

Just like Violentmonkey, but with more unsafe API.

ExperimentalExperimental
Available on Firefox for Android™Available on Firefox for Android™
3 (1 reviews)3 (1 reviews)
15 Users15 Users
You’ll need Firefox to use this extension
Download Firefox and get the extension
Download file

Extension Metadata

About this extension
# 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.
Rated 3 by 1 reviewer
Sign in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
1
2
0
1
0
Read 1 review
Permissions and dataLearn more

Required permissions:

  • Input data to the clipboard
  • Display notifications to you
  • Access browser tabs
  • Access your data for all websites
More information
Add-on Links
  • Homepage
  • Support site
Version
2.20.0
Size
2.02 MB
Last updated
a year ago (Jul 21, 2024)
Related Categories
  • Web Development
License
MIT License
Version History
  • See all versions
Add to collection
Report this add-on
Release notes for 2.20.0
add unsafe api
More extensions by gholk
  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

Go to Mozilla’s homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Browsers

  • Desktop
  • Mobile
  • Enterprise

Products

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version. Android is a trademark of Google LLC.