From 74a141550f4a02b6df7fb44c936a235d0c4850bb Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sat, 8 Feb 2020 16:28:37 +0000 Subject: [PATCH] remove ANY_HOST stuff --- README.md | 10 +++++----- publish | 3 +-- utils/env.js | 1 - webpack.config.js | 7 +------ 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8db1d57..997ed1a 100644 --- a/README.md +++ b/README.md @@ -75,9 +75,12 @@ No third party dependencies! Just `python3`. # Permissions used * `http://localhost/capture` for talking with the backend + + If you want to use an external URL as an endpoint, you will be prompted for a permission dynamically. + * `storage` for settings -* `notifications` for showing error notification -* `activeTab` for requesting url, title and selected text +* `notifications` for showing notification +* `activeTab` for requesting page info # Building & developing The most up-to-date instructions should be in [CI config](./.circleci/config.yml). @@ -89,9 +92,6 @@ You need `npm` for building the extension. After that you can find the extension in `dist` directory and 'Load unpacked** if necessary. There is also Flow and Eslint set up. -## building any host version -If you do need unresticted url permissions, build the extensions like that: `ANY_HOST=yes ./build`. - ## testing and linting Check [CI config](./.circleci/config.yml) to figure out all the checks I'm doing. diff --git a/publish b/publish index 4082874..27c13fc 100755 --- a/publish +++ b/publish @@ -17,6 +17,5 @@ function rebuild { } for browser in "chrome" "firefox"; do - TARGET="$browser" rebuild "grasp-$VERSION-$browser.zip" - TARGET="$browser" ANY_HOST='yes' rebuild "grasp-$VERSION-anyhost-$browser.zip" + TARGET="$browser" rebuild "grasp-$VERSION-$browser.zip" done diff --git a/utils/env.js b/utils/env.js index 7976eb2..d0aad45 100644 --- a/utils/env.js +++ b/utils/env.js @@ -2,6 +2,5 @@ module.exports = { NODE_ENV: (process.env.NODE_ENV || "development"), PORT: (process.env.PORT || 3000), - ANY_HOST: (process.env.ANY_HOST ? true : false), TARGET: (process.env.TARGET || 'chrome'), }; diff --git a/webpack.config.js b/webpack.config.js index c44a8db..2df85ed 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -14,7 +14,7 @@ const baseManifest = require('./src/manifest.json'); const target = env.TARGET; const dev = env.NODE_ENV === "development"; -const pkg_name = (env.ANY_HOST ? "grasp (any host)" : "grasp") + (dev ? ' [dev]' : ''); +const pkg_name = "grasp" + (dev ? ' [dev]' : ''); // TODO make permissions literate const permissions = [ @@ -25,11 +25,6 @@ const permissions = [ "https://localhost/capture" ]; -if (env.ANY_HOST) { - permissions.push("https://*/capture"); -} - - // Firefox wouldn't let you rebind its default shortcuts most of which use Shift // On the other hand, Chrome wouldn't let you use Alt const modifier = target === 'chrome' ? 'Shift' : 'Alt';