Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-1621: Site-Specific Whitelisting for Unknown Trackers via Anti-Tracking #416

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d17e342
Add anonymized data points to donut graph
Eden12345 Jun 4, 2019
3ec01dc
Half of original implementation complete
Eden12345 Jun 5, 2019
1f80f91
Copy icons to original branch
Eden12345 Jun 10, 2019
c2002a5
Finish rebuilding feature in original branch with cleaner code
Eden12345 Jun 10, 2019
3dcfa15
Rendering is working properly for the detailed view list, holding off…
Eden12345 Jun 12, 2019
f07a901
update npm dependencies. refactor webpack, babel, eslint
christophertino Jun 27, 2019
43e7683
apply new eslint rules and fix errors
christophertino Jun 27, 2019
ce2518c
fix formatting of if statements after lint auto-fix
christophertino Jul 1, 2019
95267e9
fix proptype errors in hub
christophertino Jul 1, 2019
e70fcd7
update codeowners and readme
christophertino Jul 1, 2019
4bad7bb
Shorten and correct the russian translations for cookies, fingerprint…
wlycdgr Jul 2, 2019
22236a6
Fix layout in Summary condensed view on Page Not Scanned pages (#404)
wlycdgr Jul 2, 2019
14973e6
bump browser core version
christophertino Jul 2, 2019
9a88931
updated donut number tooltip
tdtnguyen Jul 3, 2019
3cea1c7
fix tracker counting to include ad-block data
christophertino Jul 8, 2019
c610b08
Merge master into branch to access CliqzFeature component
Eden12345 Jul 9, 2019
82cb4bb
Get Anti-Tracking button working in category header
Eden12345 Jul 9, 2019
d57dc3d
Finish styling header
Eden12345 Jul 10, 2019
df763d6
Header styling and functionality complete, SVG buttons styled
Eden12345 Jul 11, 2019
0fdb21f
Resolve merge conflicts with Tino's changes to CliqzModuleData
Eden12345 Jul 11, 2019
6896ad7
Saving (relatively) working code)
Eden12345 Jul 17, 2019
8a88239
Complete core functionality, UI needs to be completed and refactored
Eden12345 Jul 18, 2019
45a97be
Finish styling
Eden12345 Jul 18, 2019
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

update npm dependencies. refactor webpack, babel, eslint
  • Loading branch information
christophertino committed Jul 2, 2019
commit f07a90139ae3c21d8bbd99866885b1e968e53e11

This file was deleted.

@@ -0,0 +1,89 @@
/**
* ESLint Config
*
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

module.exports = {
env: {
browser: true,
es6: true,
commonjs: true,
jest: true
},
extends: 'airbnb',
globals: {
chrome: true,
t: true,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
],
// 0 = off, 1 = warn, 2 = error
rules: {
'camelcase': [0],
'class-methods-use-this': [0],
'comma-dangle': ['error', {
'arrays': 'only-multiline',
'objects': 'only-multiline',
'functions': 'ignore'
}],
'func-names': [0],
'function-paren-newline': [0],
'import/prefer-default-export': [0],
'indent': [1, 'tab', {
'SwitchCase': 1
}],
'linebreak-style': [0],
'lines-between-class-members': [1],
'max-len': [0],
'no-control-regex': [0],
'no-mixed-operators': [0],
'no-nested-ternary': [0],
'no-param-reassign': [2, { 'props': false }],
'no-plusplus': [0],
'no-prototype-builtins': [0],
'no-restricted-syntax': [0],
'no-tabs': [0],
'no-underscore-dangle': [0],
'no-unused-vars': [1],
'no-useless-escape': [1],
'operator-linebreak': [0],

// Plugin: Import
'import/no-cycle': [0],

// Plugin: React
'react/destructuring-assignment': [0],
'react/jsx-indent': [1, 'tab'],
'react/jsx-indent-props': [1, 'tab'],
'react/no-danger': [0],
'react/prop-types': [0],

// Plugin: JSX-A11y
'jsx-a11y/alt-text': [0],
'jsx-a11y/anchor-is-valid': [0],
'jsx-a11y/click-events-have-key-events': [0],
'jsx-a11y/label-has-for': [0],
'jsx-a11y/mouse-events-have-key-events': [0],
'jsx-a11y/no-noninteractive-element-interactions': [0],
'jsx-a11y/no-static-element-interactions': [0],
},
};

This file was deleted.

@@ -1,8 +1,6 @@
## Build Files
dist/
build/
web-ext-artifacts/
*precompiled/
licenses.json

## Node
@@ -36,17 +36,17 @@ $ yarn upgrade
## Building
```sh
# Build all sources
$ yarn run build.dev
$ yarn build.dev
```

```sh
# Build for production
$ yarn run build.prod
$ yarn build.prod
```

```sh
# Build and watch for changes
$ yarn run build.watch
$ yarn build.watch
```

## Enable Debugging / Logging
@@ -57,33 +57,40 @@ $ yarn run build.watch
```

## Testing and Linting
```sh
# Update Jest snapshot artifacts
$ yarn test.snapshot
```

```sh
# Run unit tests
$ yarn run test.unit
$ yarn test.unit
```

```sh
# Run linter over the ./app and ./src folders
$ yarn run lint
$ yarn lint
```

```sh
# Lint a specific file
$ yarn run lint.raw -- src/utils/matcher.js
$ yarn lint.raw src/utils/matcher.js
```

```sh
# Disable lint
$ NO_LINT=true yarn run build.dev
# Test i18n string lengths for panel UI
$ yarn leet
# Reset back to original en language file
$ yarn leet.reset
```

## Build Docs
```sh
# Build JSDoc files to ./docs
$ yarn run docs
$ yarn docs
```

## Translating Files
## Internationalization
We use Transifex and their CLI to manage our translation files. Follow
[these instructions](https://docs.transifex.com/client/installing-the-client)
to get started.
@@ -0,0 +1,20 @@
/**
* Cliqz Content Scripts
*
* This file compiles content scripts for Cliqz modules
* (Ad-Blocker, HPN, Human Web)
*
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/
/**
* @namespace CliqzContentScript
*/

import 'browser-core/build/core/content';
@@ -39,7 +39,6 @@ const reducer = combineReducers({

/**
* Build store using combined reducers and middleware
* @return {[type]} [description]
* @return {Object}
* @memberof HubReactStore
*/
@@ -14,7 +14,7 @@
* @namespace LicenseClasses
*/
import React from 'react';
import Markdown from 'react-remarkable';
import Markdown from 'react-markdown';
/**
* @class Handles license entry on internal licenses.html page
* which displays licenses for all third-party packages used by Ghostery
@@ -13,7 +13,6 @@

import React from 'react';
import PropTypes from 'prop-types';
import URLSearchParams from 'url-search-params';
import Tabs from './content/Tabs';
import Tab from './content/Tab';
import Overview from './Overview';
@@ -234,7 +234,7 @@ class Tracker extends React.Component {
const path = `/app/images/panel/tracker-detail-cliqz-${type}-icon.svg`;

return (
<ReactSVG path={path} className="trk-cliqz-stats-icon" />
<ReactSVG src={path} className="trk-cliqz-stats-icon" />
);
}
_renderCliqzCookieStat(count) { return this._renderCliqzStat(count, 'cookie'); }
@@ -34,7 +34,7 @@ const NavButton = (props) => {

return (
<NavLink to={{ pathname: path, params }} className={classNames} >
<ReactSVG path={imagePath} />
<ReactSVG src={imagePath} />
</NavLink>
);
};
@@ -209,17 +209,17 @@ class Header extends React.Component {
const backArrowAndGhostieLogo = (
<span className="header-logo">
<Link to={this.determineBackPath()}>
<ReactSVG path="/app/images/panel/header-back-arrow.svg" className={headerArrowClasses} />
<ReactSVG src="/app/images/panel/header-back-arrow.svg" className={headerArrowClasses} />
</Link>
<ReactSVG path="/app/images/panel/header-logo-icon.svg" className="logo-icon" />
<ReactSVG src="/app/images/panel/header-logo-icon.svg" className="logo-icon" />
</span>
);

const plusUpgradeBannerOrSubscriberBadgeLogolink = (
<div className={badgeClasses} onClick={this.clickUpgradeBannerOrGoldPlusIcon}>
{
(subscriber && <ReactSVG path="/app/images/panel/gold-plus-icon-expanded-view.svg" />) ||
<ReactSVG path="/app/images/panel/green-upgrade-banner-expanded-view.svg" />
(subscriber && <ReactSVG src="/app/images/panel/gold-plus-icon-expanded-view.svg" />) ||
<ReactSVG src="/app/images/panel/green-upgrade-banner-expanded-view.svg" />
}
</div>
);
@@ -100,14 +100,14 @@ const StatsView = (props) => {
<div id="content-stats">
<div className="stats-top-header">
<span className="stats-top-header-title">
<ReactSVG path={graphIconPath} className={`stats-top-header-icon ${view}`} />
<ReactSVG src={graphIconPath} className={`stats-top-header-icon ${view}`} />
{graphTitle}
</span>
<span className={resetStatsButton} onClick={resetStats}>
{t('panel_stats_reset')}
{!demo && (
<div className="hs-tooltip-down" data-g-tooltip={t('panel_stats_pitch_modal_tooltip')}>
<ReactSVG path="../../app/images/panel/info.svg" className="stats-top-header-info-icon" />
<ReactSVG src="../../app/images/panel/info.svg" className="stats-top-header-info-icon" />
</div>
)}
</span>
@@ -695,7 +695,7 @@ class Summary extends React.Component {
{isPlusSubscriber &&
<div className="Summary__subscriberBadgeContainer">
<div className="SubscriberBadge">
<ReactSVG path="/app/images/panel/gold-plus-icon.svg" className="gold-plus-icon" />
<ReactSVG src="/app/images/panel/gold-plus-icon.svg" className="gold-plus-icon" />
</div>
</div>
}
@@ -704,7 +704,7 @@ class Summary extends React.Component {
<div className="Summary__upgradeBannerContainer">
<div className={upgradeBannerClassNames}>
<span className="UpgradeBanner__text">{t('subscription_upgrade_to')}</span>
<ReactSVG path="/app/images/panel/upgrade-banner-plus.svg" className="UpgradeBanner__plus" />
<ReactSVG src="/app/images/panel/upgrade-banner-plus.svg" className="UpgradeBanner__plus" />
</div>
</div>
}
@@ -11,7 +11,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/

import createMemoryHistory from 'history/createMemoryHistory';
import { createMemoryHistory } from 'history';
/**
* @var {Object} history object to be used by React Routerfor navigation within the Ghostery panel.
* @memberOf PanelUtils
ProTip! Use n and p to navigate between commits in a pull request.