Skip to content

3.7.0

Choose a tag to compare

@SecondCityOsD SecondCityOsD released this 25 May 21:15

Greasemonkey for UXP 3.7.0

Closes out the 3.7.0-beta1 dev cycle. Two themes: a Violentmonkey-parity audit and a performance audit.

Compatibility & correctness

  • GM_addElement / GM_addStyle attach the page's CSP nonce — injected <script> / <style> now run on nonce-CSP pages (GitHub, Google Search, modern news sites) where they were silently blocked.
  • GM_xmlhttpRequest({url, onload}) defaults method to "GET" per spec instead of throwing.
  • @match accepts :porthttp://localhost:3000/* parses correctly.
  • @connect *.domain.tld wildcard matches the bare host and any subdomain (TM-compatible).
  • GM_info.platform exposes browserName and browserVersion.
  • Storage Front throws (args-check, circular-value reject, db / dbFile getters, close) construct Error in the script's JS realm so e instanceof Error works in script catch blocks.
  • responseXML clone failure no longer aborts the entire XHR.
  • GM_addElement accepts Object.create(null) for the attributes object.
  • Latent bug: fileXhr HTTP method literal "open""GET".

Performance

Most visible for power-user profiles (200+ scripts). No correctness impact.

  • MatchPattern instances reused across URL tests instead of being flattened to strings and recompiled per call (~5–30 ms saved per navigation).
  • URL-test result memo + per-tab scriptsForUrl cache.
  • GM_getValue skips Cu.cloneInto for primitive returns.
  • Per-script lowercased @grant Set replaces ~180 .toLowerCase() calls per sandbox build.
  • GM_setValue no-op identical writes skip the SQL write + listener fire entirely.
  • XPCOM service / nsIStringBundle caching across logError, uuid, alert, getBrowserWindow, compareVersion.
  • 8 smaller micro-optimisations.