Skip to content

Commit 03d9fec

Browse files
authored
Merge pull request #160 from defmethodinc/upgrade-to-manifest-v3
Upgrade to manifest v3
2 parents 3f27fa9 + 9d781b2 commit 03d9fec

File tree

12 files changed

+4230
-4963
lines changed

12 files changed

+4230
-4963
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node_modules/
22
build/
33
dist/
4-
background/google-analytics-bundle.js
54
gulpfile.js
65
webpack.config.js

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.14
1+
v16.16

PRIVACY.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,23 @@ This privacy policy has been compiled to better serve those who are concerned wi
44

55
### What information do we collect from the people that use our app?
66

7-
We do not collect any PII. We collect anonymous information via Google analytics, including the following:
7+
The JustNotSorry extension does not collect any PII. We collect anonymous, aggregated information which is sent to our Google analytics account, including the following:
88

99
- Language
1010
- Country and City
1111
- Operating System
12-
- Screen Resolution
1312

1413
### When do we collect information?
1514

16-
We collect this information from you when you install the JustNotSorry Chrome extension.
15+
Google collects this information from you when you install the JustNotSorry Chrome extension using the Chrome Web Store and then provides this information in aggregate form to the JustNotSorry developers.
1716

1817
### How do we use your information?
1918

20-
We may use the information we collect from you to improve the JustNotSorry extension and to better understand who is using it.
21-
22-
### How do we protect visitor information?
23-
24-
We send all information to Google over SSL.
19+
We may use the information that the Chrome Web Store collects to improve the JustNotSorry extension and to better understand who is using it.
2520

2621
### Do we use 'cookies'?
2722

28-
We use Google Analytics, which uses first party cookies to report on user interactions. These cookies are used to store non-personally identifiable information.
23+
We use Google Analytics via the Chrome Web Store, which uses first party cookies to report on user interactions. These cookies are used to store non-personally identifiable information.
2924

3025
See https://support.google.com/analytics/answer/6004245 for more information.
3126

@@ -39,7 +34,7 @@ We do not include or offer third party products or services on our website.
3934

4035
### Opting out
4136

42-
Users can set preferences for whether or not JustNotSorry collects usage information by going to the JustNotSorry options page via the chrome://extensions/ link. Alternatively, you can opt out permanently using the Google Analytics Opt Out Browser add on.
37+
You can manage your privacy settings for your Google Account as described in the [Google Privacy Policy](https://policies.google.com/privacy). To opt out permanently from Google Analytics, you can use the [Google Analytics Opt Out Browser add on](https://chrome.google.com/webstore/detail/google-analytics-opt-out/fllaojicojecljbmefodhfapmkghcbnh?hl=en).
4338

4439
### California Online Privacy Protection Act
4540

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ To publish this release, download the zip file from GitHub. Find the Just Not So
7474
For production:
7575

7676
- [dom-regexp-match](https://github.com/webmodules/dom-regexp-match)
77-
- [chrome-platform-analytics](https://github.com/GoogleChrome/chrome-platform-analytics)
7877
- Based on [gmail-chrome-extension-boilerplate](https://github.com/KartikTalwar/gmail-chrome-extension-boilerplate)
7978
- [preact/compat](https://github.com/preactjs/preact-compat)
8079

background/background.js

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,4 @@
1-
var gaService = analytics.getService('JustNotSorryTest');
2-
3-
chrome.runtime.onInstalled.addListener(async function ({ reason }) {
4-
var tracker = gaService.getTracker('UA-3535278-4'); // prod
5-
var timing = tracker.startTiming('Analytics Performance', 'Send Event');
6-
tracker.sendAppView('JustNotSorryInstalled');
7-
timing.send();
8-
9-
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
10-
chrome.declarativeContent.onPageChanged.addRules([
11-
{
12-
conditions: [
13-
new chrome.declarativeContent.PageStateMatcher({
14-
pageUrl: { urlContains: 'mail.google.com' },
15-
}),
16-
new chrome.declarativeContent.PageStateMatcher({
17-
pageUrl: { urlContains: 'outlook.office.com' },
18-
}),
19-
new chrome.declarativeContent.PageStateMatcher({
20-
pageUrl: { urlContains: 'outlook.live.com' },
21-
}),
22-
new chrome.declarativeContent.PageStateMatcher({
23-
pageUrl: { urlContains: 'outlook.office365.com' },
24-
}),
25-
],
26-
actions: [new chrome.declarativeContent.ShowPageAction()],
27-
},
28-
]);
29-
});
30-
1+
chrome.runtime.onInstalled.addListener(function ({ reason }) {
312
if (reason === 'update') {
323
const notificationId = `JNS-${Date.now()}`;
334
const url = 'https://defmethodinc.github.io/just-not-sorry/releases.html';
@@ -37,20 +8,18 @@ chrome.runtime.onInstalled.addListener(async function ({ reason }) {
378
iconUrl: 'img/JustNotSorry-48.png',
389
title: `JustNotSorry updated to v${manifest.version_name}`,
3910
message: "Click here to see what's new",
11+
buttons: [{ title: 'View Release Notes' }],
4012
type: 'basic',
4113
});
42-
chrome.notifications.onClicked.addListener(function () {
43-
window.open(url);
14+
const handleClick = function () {
15+
chrome.tabs.create({ url });
4416
chrome.notifications.clear(notificationId);
45-
});
17+
};
18+
chrome.notifications.onClicked.addListener(handleClick);
19+
chrome.notifications.onButtonClicked.addListener(handleClick);
4620
}
4721
});
4822

49-
chrome.pageAction.onClicked.addListener(function () {
50-
if (chrome.runtime.openOptionsPage) {
51-
chrome.runtime.openOptionsPage();
52-
} else {
53-
// fallback to old way
54-
window.open(chrome.runtime.getURL('options.html'));
55-
}
23+
chrome.action.onClicked.addListener(function () {
24+
chrome.runtime.openOptionsPage();
5625
});

0 commit comments

Comments
 (0)