Skip to content

Commit

Permalink
Merge branch 'release/v0.0.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
vicocotea committed Feb 3, 2021
2 parents 94e7c47 + 8d81ef3 commit 1e60132
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.13
- fix : firefox issue with sendMessage
- enhance some build processes

## 0.0.12
- performance : reduce the weight of content_script.js, smaller size means smaller initialization time
- tasks to test the correct functioning of the extension
Expand Down
8 changes: 4 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# low—web extension (v0.0.12)
# low—web extension (v0.0.13)

Reduce energy consumption and carbon footprint of your internet browsing.

Expand Down Expand Up @@ -226,9 +226,9 @@ Some CSS properties can affect rendering performance of a page (and therefore in
## Development / Build

- tested on node 12.20 / npm 6.14
- installatioh : `npm install`
- development : `npm run watch`
- build : `npm run build` (extension will be built to dist/ folder)
- installation : `npm install`
- development : `npm start` (firefox) or `npm run dev:chrome` or `npm run dev:opera`
- build : `npm run build` (firefox, chrome, opera) built to dist/ folder or `npm run build:firefox` or `npm run build:chrome`

Pages for tests :
https://lowwebtech.github.io/low-web-extension/
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "low-web",
"version": "0.0.12",
"version": "0.0.13",
"description": "Reduce energy consumption and carbon footprint of your internet browsing.",
"author": "[email protected]",
"license": "MIT",
Expand All @@ -11,7 +11,6 @@
"prettier:fix": "npm run prettier -- --write",
"fix": "run-s lint:fix prettier:fix",
"build": "run-s build:chrome build:firefox build:opera",
"build:dev": "cross-env NODE_ENV=development webpack --hide-modules",
"dev:chrome": "cross-env NODE_ENV=development TARGET_BROWSER=chrome webpack --watch --mode=development",
"dev:firefox": "cross-env NODE_ENV=development TARGET_BROWSER=firefox webpack --watch --mode=development",
"dev:opera": "cross-env NODE_ENV=development TARGET_BROWSER=opera webpack --watch --mode=development",
Expand All @@ -21,7 +20,7 @@
"build:zip": "node src/utils/build-zip.js",
"build:report": "webpack-bundle-analyzer --port 4200 dist/stats.json",
"watch:nohmr": "npm run build -- --watch",
"start": "cross-env HMR=true npm run build:dev -- --watch",
"start": "cross-env HMR=true npm run dev:firefox -- --watch",
"release": "run-s build test build:zip release:chrome release:firefox",
"release:firefox": "web-ext-submit --source-dir dist/firefox",
"release:chrome": "webstore upload --source=dist/chrome --auto-publish",
Expand Down Expand Up @@ -75,7 +74,7 @@
"vuex": "^3.5.1",
"vuex-webextensions": "^1.3.0",
"web-ext-submit": "^5.1.0",
"webextension-polyfill": "^0.6",
"webextension-polyfill": "^0.7",
"wext-manifest": "^2.2.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/background_script/message/is-active.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import store from '../../store';
*/
export function onMessageIsActive(request, sender, sendResponse) {
if (request.message === 'isActive') {
const location = request.options.location;
store.commit('url', location.href);
return store.getters.isActive(location.href, location.hostname);
const { href, hostname } = request.options;
store.commit('url', href);
return store.getters.isActive(href, hostname);
}
}
3 changes: 2 additions & 1 deletion src/content_script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function start() {
.sendMessage({
message: 'isActive',
options: {
location: window.location,
href: window.location.href,
hostname: window.location.hostname,
},
})
.then(
Expand Down
4 changes: 2 additions & 2 deletions src/manifest/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const pkg = require('../../package.json');

let csp = "script-src 'self'; object-src 'self'";
if (process.env.NODE_ENV === 'development') csp = 'script-src "self" "unsafe-eval"; object-src "self"';
let csp = "script-src 'self'; object-src 'self'; default-src 'self'";
if (process.env.NODE_ENV === 'development') csp = "script-src 'self' 'unsafe-eval'; object-src 'self'; default-src 'self'";

const manifestInput = {
manifest_version: 2,
Expand Down

0 comments on commit 1e60132

Please sign in to comment.