remove ANY_HOST stuff
This commit is contained in:
parent
70e60a8276
commit
74a141550f
10
README.md
10
README.md
|
@ -75,9 +75,12 @@ No third party dependencies! Just `python3`.
|
||||||
|
|
||||||
# Permissions used
|
# Permissions used
|
||||||
* `http://localhost/capture` for talking with the backend
|
* `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
|
* `storage` for settings
|
||||||
* `notifications` for showing error notification
|
* `notifications` for showing notification
|
||||||
* `activeTab` for requesting url, title and selected text
|
* `activeTab` for requesting page info
|
||||||
|
|
||||||
# Building & developing
|
# Building & developing
|
||||||
The most up-to-date instructions should be in [CI config](./.circleci/config.yml).
|
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.
|
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
|
## testing and linting
|
||||||
Check [CI config](./.circleci/config.yml) to figure out all the checks I'm doing.
|
Check [CI config](./.circleci/config.yml) to figure out all the checks I'm doing.
|
||||||
|
|
||||||
|
|
3
publish
3
publish
|
@ -17,6 +17,5 @@ function rebuild {
|
||||||
}
|
}
|
||||||
|
|
||||||
for browser in "chrome" "firefox"; do
|
for browser in "chrome" "firefox"; do
|
||||||
TARGET="$browser" rebuild "grasp-$VERSION-$browser.zip"
|
TARGET="$browser" rebuild "grasp-$VERSION-$browser.zip"
|
||||||
TARGET="$browser" ANY_HOST='yes' rebuild "grasp-$VERSION-anyhost-$browser.zip"
|
|
||||||
done
|
done
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: (process.env.NODE_ENV || "development"),
|
NODE_ENV: (process.env.NODE_ENV || "development"),
|
||||||
PORT: (process.env.PORT || 3000),
|
PORT: (process.env.PORT || 3000),
|
||||||
ANY_HOST: (process.env.ANY_HOST ? true : false),
|
|
||||||
TARGET: (process.env.TARGET || 'chrome'),
|
TARGET: (process.env.TARGET || 'chrome'),
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@ const baseManifest = require('./src/manifest.json');
|
||||||
const target = env.TARGET;
|
const target = env.TARGET;
|
||||||
const dev = env.NODE_ENV === "development";
|
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
|
// TODO make permissions literate
|
||||||
const permissions = [
|
const permissions = [
|
||||||
|
@ -25,11 +25,6 @@ const permissions = [
|
||||||
"https://localhost/capture"
|
"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
|
// 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
|
// On the other hand, Chrome wouldn't let you use Alt
|
||||||
const modifier = target === 'chrome' ? 'Shift' : 'Alt';
|
const modifier = target === 'chrome' ? 'Shift' : 'Alt';
|
||||||
|
|
Loading…
Reference in a new issue