UNPKG

webext-detect

Version:

Detects where the current browser extension code is being run. Compatible with Firefox, Chrome and derivates.

87 lines (86 loc) 1.75 kB
{ "name": "webext-detect", "version": "6.0.0", "description": "Detects where the current browser extension code is being run. Compatible with Firefox, Chrome and derivates.", "keywords": [ "background page", "browser", "chrome", "content script", "detect", "extension", "context", "firefox", "safari", "options page", "web-ext", "webext", "where" ], "repository": "fregante/webext-detect", "funding": "https://github.com/sponsors/fregante", "license": "MIT", "author": "Federico Brigante <me@fregante.com> (https://fregante.com)", "sideEffects": false, "type": "module", "exports": "./index.js", "types": "./index.d.ts", "files": [ "index.js", "index.d.ts" ], "scripts": { "build": "tsc", "demo:build": "parcel build --no-cache", "demo:watch": "parcel watch --no-cache --no-hmr", "prepare": "tsc --sourceMap false", "test": "xo && tsc && node index.js", "watch": "tsc --watch" }, "xo": { "rules": { "@stylistic/function-paren-newline": "off", "unicorn/prevent-abbreviations": [ "error", { "replacements": { "dev": false } } ] } }, "devDependencies": { "@parcel/config-webextension": "^2.13.3", "@parcel/resolver-default": "^2.13.3", "@sindresorhus/tsconfig": "^8.1.0", "@types/chrome": "^0.1.40", "parcel": "^2.13.3", "typescript": "^6.0.2", "xo": "^2.0.2" }, "engines": { "node": ">=24" }, "@parcel/resolver-default": { "packageExports": true }, "targets": { "main": false, "default": { "source": "demo/manifest.json", "distDir": "./distribution", "sourceMap": { "inline": true } } }, "webExt": { "sourceDir": "distribution", "run": { "startUrl": [ "https://example.com" ] } } }