Skip to content

Commit

Permalink
#40 - Added pm-toggle component (#47)
Browse files Browse the repository at this point in the history
* #40 - Added pm-toggle component

* Noissue - Added components to the dist and fixed pm-toggle styles

* #40 - Used new location for the web components

* #40 - Added tests for '3-rd party cookies' setting

* #45, #43 - Promisified permissions, storage settingList and added tests

* #43 - Added puppeteer tests to the travis

* #43 - Puppeteer browser launch throws error

* #43 - move optional permission to the permission

* #50 - Stop using addSettingItem callback as a listener

* #51 - Added test for ActiveTab toggle

* #40 - Finish SettingList component
  • Loading branch information
Manvel authored Oct 24, 2019
1 parent 123f41d commit 361f627
Show file tree
Hide file tree
Showing 15 changed files with 435 additions and 225 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"ecmaVersion": 2018
},
"globals": {
"browser": true,
"it": true,
"describe": true,
"after": true,
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ privacy-manager.zip
.DS_Store
package-lock.json
node_modules
dist
dist
src/css/pm-tab-panel.css
src/img
src/src/components.js
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"no-descending-specificity": null,
"block-closing-brace-newline-after": "always",
"selector-type-no-unknown": [true, { ignoreTypes: ["pm-tab-panel", "pm-tabs",
"pm-tab", "pm-panels"] }]
"pm-tab", "pm-panels", "pm-toggle"] }]
}
}
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
dist: trusty
sudo: false
os:
- linux
- osx
node_js:
- "node"
- "lts/*"
Expand All @@ -12,4 +12,9 @@ cache:
before_script:
- npm install
script:
- npm test
- npm test
before_install:
# see -> https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-on-travis-ci
- "sysctl kernel.unprivileged_userns_clone=1"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"description": "Privacy Manager is a chrome extension for data transparency and control",
"scripts": {
"build": "cd src; zip -r ../privacy-manager.zip .",
"test": "npm run test:eslint && npm run test:stylelint",
"test:puppeteer": "mocha test/*.js",
"test": "npm run test:eslint && npm run test:stylelint && npm run test:puppeteer",
"test:puppeteer": "npm run build:webpack && mocha test/puppeteer.js",
"test:eslint": "eslint src",
"test:stylelint": "stylelint src/**/*.css",
"import:components": "pm-components --single-bundle --output src",
"build:webpack": "webpack --config webpack.config.js",
"build:webpack:watch": "webpack --config webpack.config.js --watch"
"import:components": "pm-components --single-bundle --output dist/js",
"build:webpack": "npm run import:components && webpack --config webpack.config.js",
"build:webpack:watch": "npm run import:components && webpack --config webpack.config.js --watch"
},
"repository": {
"type": "git",
Expand All @@ -33,7 +33,7 @@
"puppeteer": "^1.20.0",
"stylelint": "^9.9.0",
"stylelint-config-recommended": "^2.1.0",
"webextension-polyfill": "^0.5.0",
"webextension-polyfill": "github:Manvel/webextension-polyfill#privacy-manager",
"webpack": "^4.41.0"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ body
min-width: 550px;
}

pm-toggle
{
width: 100%;
}

/*******************************************************************************
* Tabs
******************************************************************************/
Expand Down
3 changes: 0 additions & 3 deletions src/js/ui/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ const {registerActionListener} = require("./actionListener");
});

// Settings list localization
var content = Elem("#settings-list").content;
content.querySelector("#btn-on-label").textContent = getMsg("on");
content.querySelector("#btn-off-label").textContent = getMsg("off");
}, false);
})();

Expand Down
Loading

0 comments on commit 361f627

Please sign in to comment.