-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Feature: Privacy Notice Consent popup for Firefox #99
Merged
ErikBjare
merged 13 commits into
ActivityWatch:master
from
Morpheus0x:feature/privacy-notice-consent
Jan 18, 2023
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0748019
created consent page with style and js
Morpheus0x 5db9ab4
implemented ask consent popup
Morpheus0x 4e752e2
renamed refuse button, since an extension can't uninstall itself
Morpheus0x fb587aa
implemented extra consent button, if first popup was denied
Morpheus0x faf351c
extra script for installed listener needed to execute in time
Morpheus0x c3cfd81
implemented button actions
Morpheus0x 12fe896
various bug fixes and made compatible with chrome
Morpheus0x 8fced75
cleanup
Morpheus0x 413c50d
added explicit semicolon
Morpheus0x 58eea13
implemented remove extension on consent refused
Morpheus0x 7605822
implemented giving consent using enterprise policy
Morpheus0x 9847c8e
added firefox enterprise policy example
Morpheus0x f4edfcd
fixed typo
Morpheus0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
|
||
"background": { | ||
"scripts": [ | ||
"static/installed.js", | ||
"out/app.js" | ||
], | ||
"persistent": false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>ActivityWatch Consent Dialog</title> | ||
|
||
<link href="./style.css" rel="stylesheet" type="text/css"> | ||
|
||
<script src="./consent.js"></script> | ||
</head> | ||
|
||
<body class="consent"> | ||
<img src="/media/banners/banner.png" style="width: 100%"> | ||
|
||
<hr> | ||
|
||
<h1>Privacy Notice</h1> | ||
<p> | ||
This extension by nature collects personal identifiable information in the form of URLs. All collected information never leaves your device because all data is only forwarded to localhost. Since this is the core functionality of this extension, the only option to not consent, is to uninstall. | ||
</p> | ||
<div class="action-container"> | ||
<div class="action"><button class="button" id="consent-refused">Close Window</button></div> | ||
<div class="action"><button class="button accept" id="consent-given">Consent to offline data collection</button></div> | ||
</div> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"use strict"; | ||
|
||
function consentListeners() { | ||
let consent_refused = document.getElementById('consent-refused'); | ||
let consent_given = document.getElementById('consent-given'); | ||
consent_refused.addEventListener("click", (obj) => { | ||
window.close() | ||
}); | ||
consent_given.addEventListener("click", (obj) => { | ||
chrome.runtime.sendMessage({enabled: true}, function(response) {}); | ||
chrome.storage.local.set({"noConsentGiven": false}); | ||
window.close() | ||
}) | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
consentListeners(); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"use strict"; | ||
|
||
chrome.runtime.onInstalled.addListener(async ({ reason, temporary }) => { | ||
switch (reason) { | ||
case "install": | ||
{ | ||
chrome.storage.local.set({"askConsent": true}); | ||
} | ||
break; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should prompt the user to uninstall/disable the extension, if we can, as per Mozilla guidelines: https://extensionworkshop.com/documentation/develop/best-practices-for-collecting-user-data-consents/