Greasemonkey Automation - sgml/signature GitHub Wiki
-
browser.storage.local
Used forGM_getValue,GM_setValue,GM_deleteValue,GM_listValues.
Provides persistent key/value storage for user scripts.
-
XMLHttpRequest
Classic API used forGM_xmlhttpRequest.
Allows cross-domain HTTP requests (predatingfetch). -
fetch (modern fallback)
Sometimes used in newer implementations, but Greasemonkey historically wrapsXMLHttpRequest.
-
document.createElement, appendChild, insertBefore
Used forGM_addStyleand script/style injection. -
document.querySelector, document.getElementById
Used for locating insertion points in the DOM.
-
navigator.clipboard.writeText
Modern API used forGM_setClipboard. -
document.execCommand("copy")
Legacy fallback for clipboard operations.
-
browser.notifications
Used forGM_notification.
Provides system-level notifications from extensions.
-
browser.tabs.create
Used forGM_openInTab.
Opens new browser tabs programmatically. -
browser.windows
Used for window-level management when needed.
-
browser.contextMenus / browser.menus
Used forGM_registerMenuCommand.
Adds custom commands to the extension’s right-click menu.
-
browser.downloads.download
Used forGM_download.
Provides file download functionality from user scripts.
-
browser.runtime.sendMessage / browser.runtime.onMessage
Used internally for communication between background scripts and content scripts.
- Early Greasemonkey (pre-WebExtension) relied on Firefox XPCOM Components (
nsIFile,nsIIOService, etc.). - Modern Greasemonkey (v4+) uses the WebExtensions API for cross-browser compatibility.
- Tampermonkey and Violentmonkey follow the same model, often polyfilling with
fetch,localStorage, or IndexedDB.
Greasemonkey’s GM_* functions are wrappers around stable browser APIs:
-
Storage →
browser.storage.local -
Networking →
XMLHttpRequest/fetch - DOM Injection → Standard DOM methods
-
Clipboard →
navigator.clipboard -
Notifications →
browser.notifications -
Tabs →
browser.tabs -
Menus →
browser.contextMenus -
Downloads →
browser.downloads -
Messaging →
browser.runtime
These APIs are frozen and stable, ensuring long-term compatibility for user scripts.
function click1000(){
document.querySelector("#load_more").click()
}
var clickInterval = window.setInterval(click1000, 1000);
#Anti-Modal
$("div[name='trap-focus']").remove()
document.body.removeAttribute("style")
chrome://guerilla-script-dox/content/README.txt
https://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window
https://www.tampermonkey.net/documentation.php
https://violentmonkey.github.io/api/gm/
https://blog.mozilla.org/addons/2019/03/26/extensions-in-firefox-67/#userscripts
https://designsystem.digital.gov/components/form-controls/
https://developer.chrome.com/extensions/migrating_to_manifest_v3
https://blog.mozilla.org/addons/2019/09/03/mozillas-manifest-v3-faq/