-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a consent popup for Firefox (#375)
* [feat] add consent page, block all action until consent is given * [fix] check if the user still consents every update i guess * [fix] use a then chain instead of a top-level await * [fix] remove one call to DispatchEvent * [fix] use firefox's proprietary message passing stuff if available (This sucks) * [fix] add consent page to rollup config * [fix] add a comma * stylization and reorganization of info * set a max/min width for text, realign bullet list * [fix] don't use main element (weird difference between dev and build whoops) * [fix] update magic numbers for phones * [fix] button resizing itself * [fix] add padding, make bullet points not run off the edge * [fix] add a way to only trigger the consent popup if the old version needs it * [fix] make "i hate this" comment more explanatory
- Loading branch information
1 parent
3b3029d
commit bd0dc8d
Showing
12 changed files
with
184 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,47 @@ | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Blue Blocker Data Disclosure</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
<link href="/icon/icon-128.png" rel="icon" type="image/png" sizes="128x128" /> | ||
<script src="./index.ts" type="module"></script> | ||
</head> | ||
<body> | ||
<div class="main"> | ||
<div class="center"> | ||
<h1>Collection of Data Disclosure</h1> | ||
<br> | ||
<p>Really quickly, before you can use Blue Blocker we have to show you this page. Please read it carefully so that you can understand how Blue Blocker collects, uses and transmits your user data.</p> | ||
<br> | ||
<div> | ||
<p>Blue Blocker collects the following data: | ||
<div class="bullet-list"> | ||
<p>- Cookies and tokens used to make requests to Twitter</p> | ||
<p>- The URL of all requests made by the Twitter client</p> | ||
<p>- Responses from Twitter servers</p> | ||
</div> | ||
</p> | ||
</div> | ||
<br> | ||
<p>Your data is used to check if Twitter accounts you run into have Twitter Blue, or match other features that you configure, and then automatically blocks them</p> | ||
<br> | ||
<p>All data that is stored by the extension is stored locally on device</p> | ||
<br> | ||
<p>Your data is only (re)transmitted to Twitter's servers and/or extensions that you consent to sending data to</p> | ||
<br> | ||
<p>All data that Blue Blocker collects, stores, uses, and transmits is mandatory for the function of the extension Because the collection, storage, usage, and transmission of personal data is necessary for the function of this extension, refusing will cause the extension to be uninstalled</p> | ||
<br> | ||
<p>To read the full privacy policy visit the <a href="https://addons.mozilla.org/en-US/firefox/addon/blue-blocker/privacy/" target="_blank" rel="noopener noreferrer">Firefox addons page</a></p> | ||
<br> | ||
<p>Having read the above disclosure, do you consent to Blue Blocker collecting, storing, using, and transmitting your personal data?</p> | ||
<div class="inputs"> | ||
<button id="accept">I consent</button> | ||
<button id="refuse">I do not consent</button> | ||
<div> | ||
<label for="refuse">⚠️ as a reminder, refusing will uninstall the extension</label> | ||
</div> | ||
</div> | ||
</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,15 @@ | ||
import '../style.css'; | ||
import './style.css'; | ||
import { api } from '../../constants'; | ||
|
||
const accept = document.getElementById('accept'); | ||
const refuse = document.getElementById('refuse'); | ||
|
||
accept?.addEventListener('click', async () => { | ||
await api.storage.local.remove('holdUntilConsent'); | ||
window.close(); | ||
}); | ||
|
||
refuse?.addEventListener('click', () => { | ||
api.management.uninstallSelf(); | ||
}) |
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,45 @@ | ||
p { | ||
font-size: 1rem; | ||
width: auto; | ||
} | ||
|
||
.center { | ||
min-width: 50ch; | ||
max-width: 120ch; | ||
padding: 25px; | ||
} | ||
|
||
img { | ||
height: 75px; | ||
width: auto; | ||
} | ||
|
||
.bullet-list { | ||
width: fit-content; | ||
display: block; | ||
margin-left: calc(50% - 21ch); | ||
& p { | ||
text-align: left; | ||
} | ||
} | ||
|
||
button, button:active, button:focus { | ||
font-size: 1.1rem; | ||
} | ||
|
||
.inputs { | ||
margin-top: 1.1em; | ||
|
||
& div { | ||
margin-top: 5px; | ||
} | ||
} | ||
|
||
.main { | ||
height: 100vh; | ||
width: 100vw; | ||
padding: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} |
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