webext-detect

Detects where the current browser extension code is being run. Chrome and Firefox.

MIT License

Downloads
3.4K
Stars
46
Committers
2

Bot releases are hidden (Show)

webext-detect - Latest Release

Published by fregante 4 months ago

🍄

The package has been renamed from webext-detect-page to webext-detect

Run this to upgrade:

npm remove webext-detect-page
npm install webext-detect

And then do a global search and replace in your code.

https://github.com/fregante/webext-detect/compare/v5.0.1...v5.0.2

webext-detect -

Published by fregante 9 months ago

  • isPersistentBackgroundPage: Avoid false positive on MV3 Firefox (#29) 75576b4

https://github.com/fregante/webext-detect-page/compare/v5.0.0...v5.0.1

webext-detect -

Published by fregante 10 months ago

  • Define exports field 5d94b01
  • Change contextNames export to be an array of strings 0e7061e

https://github.com/fregante/webext-detect-page/compare/v4.2.1...v5.0.0

webext-detect -

Published by fregante 10 months ago

webext-detect -

Published by fregante 10 months ago

  • Add isPersistentBackgroundPage (#27) a963d20
  • Add isDevTools (#26) 5fab945
  • Add isSidePanel (#25) 63c55a4

https://github.com/fregante/webext-detect-page/compare/v4.1.1...v4.2.0

Sponsors

Release sponsored by PixieBrix 🎉

webext-detect -

Published by fregante about 1 year ago

  • Support srcdoc iframes and about:blank (#20) 8167983

https://github.com/fregante/webext-detect-page/compare/v4.1.0...v4.1.1

Sponsors

Release sponsored by PixieBrix 🎉

webext-detect -

Published by fregante over 1 year ago

webext-detect -

Published by fregante over 2 years ago

webext-detect -

Published by fregante almost 3 years ago

Breaking changes

New

  • Add isBackgroundWorker to detect Manifest v3 background service workers
  • Add isBackground to detect both workers and pages

Improvements

  • isBackgroundPage no longer calls getBackgroundPage but instead relies on the current URL and the manifest for detection

Sponsors

Release sponsored by PixieBrix 🎉

webext-detect -

Published by fregante almost 3 years ago

New

  • Add getContextName (#17) bd8b9db

Sponsors

Release sponsored by PixieBrix 🎉

https://github.com/fregante/webext-detect-page/compare/v3.0.2...v3.1.0

webext-detect -

Published by fregante about 3 years ago

  • Shorten isDevToolsPage detection 0024046
  • Fix isOptionsPage and isDevToolsPage (#14) f873839

https://github.com/fregante/webext-detect-page/compare/v3.0.1...v3.0.2

webext-detect -

Published by fregante about 3 years ago

New

  • Add isDevToolsPage (#6) 739c222
  • Add isWebPage and isExtensionContext ac7ac1a
  • Add isChrome, isFirefox, isSafari (#10) 7d1eab8

Breaking

  • Use globalThis and optional chaining operator 9db0769 d51ce6d (this increases the minimum browser version)

Improved

  • Cache results internally to avoid issues during an extension update 1cc2e12

Sponsors

Release sponsored by PixieBrix 🎉

https://github.com/fregante/webext-detect-page/compare/v2.0.6...v3.0.1

webext-detect -

Published by fregante about 3 years ago

Refer to v3.0.1

webext-detect -

Published by fregante almost 4 years ago

  • Add Safari support to isBackgroundPage 566e0a9

https://github.com/fregante/webext-detect-page/compare/v2.0.5...v2.0.6

webext-detect -

Published by fregante about 4 years ago

Patches

  • Avoid errors when running in non-browser environments /3: eca03d213e654b2a3187590cf2d989542fa8defb
webext-detect -

Published by fregante over 4 years ago

Patches

  • Avoid errors when running in non-browser environments /2: c7c43c58661b40641a5a1b98262735fa3ddd86e1
webext-detect -

Published by fregante over 4 years ago

Patches

  • Avoid errors when running in non-browser environments: 348dbcdfbe2e5d93f799099240c8048dcaaa8cdb
webext-detect -

Published by fregante over 4 years ago

Patches

  • Fix ESM bundler support /2: ac89a050ad48fe5ff634b2df949727ab7cbad514
  • Update dependencies: 6b4b4c68c577d8344c93c08ef1a40ed3d4970e4e
webext-detect -

Published by fregante almost 5 years ago

Patches

  • Fix ESM bundler support: 78a4a55b17f7ff082dd840d406fc2562b954b43f
webext-detect -

Published by fregante almost 5 years ago

Major Changes

Patches

  • Improve background page detection: #1