Utility functions to inject content scripts from a WebExtension
MIT License
Bot releases are visible (Hide)
canAccessTab
(#37) a1cf691https://github.com/fregante/webext-content-scripts/compare/v2.6.1...v2.7.0
executeFunction
: support iframe[srcdoc]
and about:blank
(#32) 25db5c0https://github.com/fregante/webext-content-scripts/compare/v2.6.0...v2.6.1
undefined
URL in isScriptableUrl
9c98a0chttps://github.com/fregante/webext-content-scripts/compare/v2.5.5...v2.6.0
https://github.com/fregante/webext-content-scripts/compare/v2.5.4...v2.5.5
executeScript
promise after execution (#23) fc44d9bhttps://github.com/fregante/webext-content-scripts/compare/v2.5.3...v2.5.4
runAt
types to facilitate injection from the manifest b8f88a2https://github.com/fregante/webext-content-scripts/compare/v2.5.2...v2.5.3
browser
types with chrome
(#21) 29c54b7https://github.com/fregante/webext-content-scripts/compare/v2.5.1...v2.5.2
https://github.com/fregante/webext-content-scripts/compare/v2.5.0...v2.5.1
executeFunction
: throw error when passing native functions (#18) 0ec3d36https://github.com/fregante/webext-content-scripts/compare/v2.4.0...v2.5.0
excludeMatches
support to getTabsByUrl
8dc6595https://github.com/fregante/webext-content-scripts/compare/v2.3.0...v2.4.0
getTabsByUrl
utility to facilitate injectContentScript
by URL a160748injectContentScript
: Support injecting into multiple targets at once 56f5917https://github.com/fregante/webext-content-scripts/compare/v2.2.0...v2.3.0
isScriptableUrl
to HTTP and HTTPS URLs d6c75e9https://github.com/fregante/webext-content-scripts/compare/v2.1.0...v2.2.0
ignoreTargetErrors
option to all injectors fc638bdThis will optionally silence console errors like "Error: The tab was closed." if tab closes while injecting in the background page console.
Whole module sponsored by PixieBrix 🎉
https://github.com/fregante/webext-content-scripts/compare/v2.0.0...v2.1.0
allFrames
support to injectContentScript
206ab8binjectContentScript(123, scripts);
In v1, this would inject the scripts
into the top frame of tab 123.
In v2+, this will inject the scripts
in all frames of tab 123.
The previous behavior is still achievable via the explicit:
injectContentScript({tabId: 123, frame: 0}, scripts);
https://github.com/fregante/webext-content-scripts/compare/v1.0.3...v2.0.0
injectContentScript
and insertCSS
(#13) 4641305https://github.com/fregante/webext-content-scripts/compare/v1.0.2...v1.0.3
https://github.com/fregante/webext-content-scripts/compare/v1.0.1...v1.0.2
isScriptableUrl
441cfabhttps://github.com/fregante/webext-content-scripts/compare/v1.0.0...v1.0.1
isScriptableUrl
6f22ea4https://github.com/fregante/webext-content-scripts/compare/v0.12.0...v1.0.0
injectContentScript
(#8) 247532aexecuteScript
and insertCSS
that work both on MV2 and MV3 (#7) abb57e3https://github.com/fregante/webext-content-scripts/compare/v0.11.1...v0.12.0
https://github.com/fregante/webext-content-scripts/compare/v0.11.0...v0.11.1