icons and popup
@ -0,0 +1,46 @@
|
|||||||
|
const accordions = document.querySelectorAll(".accordion");
|
||||||
|
|
||||||
|
chrome.storage.sync.get(["selected"], (result) => {
|
||||||
|
syncCategories(result.selected);
|
||||||
|
});
|
||||||
|
|
||||||
|
const syncCategories = function (selected) {
|
||||||
|
for (const accordion of accordions) {
|
||||||
|
let expandButton = accordion.querySelector('.more-info input[type="checkbox"]');
|
||||||
|
let content = accordion.querySelector(".content");
|
||||||
|
accordion.style.height = expandButton.addEventListener("change", (e) => {
|
||||||
|
if (e.target.checked) {
|
||||||
|
content.style.maxHeight = content.scrollHeight + "px";
|
||||||
|
content.style.marginTop = "24px";
|
||||||
|
} else {
|
||||||
|
content.style.marginTop = 0;
|
||||||
|
content.style.maxHeight = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
let checkbox = accordion.querySelector(".switch input");
|
||||||
|
let category = checkbox.id;
|
||||||
|
console.log(category);
|
||||||
|
checkbox.checked = selected.includes(category);
|
||||||
|
|
||||||
|
checkbox.addEventListener("change", () => {
|
||||||
|
checkbox.checked
|
||||||
|
? selected.push(category)
|
||||||
|
: selected.splice(selected.indexOf(category), 1);
|
||||||
|
chrome.storage.sync.set({ selected });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("resize", (e) => {
|
||||||
|
for (const accordion of accordions) {
|
||||||
|
let content = accordion.querySelector(".content");
|
||||||
|
if (accordion.querySelector('.more-info input[type="checkbox"]').checked) {
|
||||||
|
content.style.maxHeight = content.scrollHeight + "px";
|
||||||
|
content.style.marginTop = "24px";
|
||||||
|
} else {
|
||||||
|
content.style.marginTop = 0;
|
||||||
|
content.style.maxHeight = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 370 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 889 B After Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
@ -1,12 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Document</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
Start test
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,20 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Document</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>
|
|
||||||
Tempor dolore voluptate aute velit. Anim laboris deserunt ut Lorem sunt. Occaecat
|
|
||||||
consectetur ex proident culpa consectetur aliqua minim nulla consequat amet enim. Ipsum
|
|
||||||
excepteur fugiat reprehenderit laboris sint.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Location tempor eheh ahah</p>
|
|
||||||
|
|
||||||
<p>Usage of data</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||||||
const accordions = document.querySelectorAll(".accordion");
|
|
||||||
|
|
||||||
for (const accordion of accordions) {
|
|
||||||
let expandButton = accordion.querySelector('.more-info input[type="checkbox"]');
|
|
||||||
let content = accordion.querySelector(".content");
|
|
||||||
accordion.style.height = expandButton.addEventListener("change", (e) => {
|
|
||||||
if (e.target.checked) {
|
|
||||||
content.style.maxHeight = content.scrollHeight + "px";
|
|
||||||
content.style.marginTop = "24px";
|
|
||||||
} else {
|
|
||||||
content.style.marginTop = 0;
|
|
||||||
content.style.maxHeight = null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("resize", (e) => {
|
|
||||||
for (const accordion of accordions) {
|
|
||||||
let content = accordion.querySelector(".content");
|
|
||||||
if (accordion.querySelector('.more-info input[type="checkbox"]').checked) {
|
|
||||||
content.style.maxHeight = content.scrollHeight + "px";
|
|
||||||
content.style.marginTop = "24px";
|
|
||||||
} else {
|
|
||||||
content.style.marginTop = 0;
|
|
||||||
content.style.maxHeight = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Laag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 1117 479" style="enable-background:new 0 0 1117 479;" xml:space="preserve">
|
|
||||||
<style type="text/css">
|
|
||||||
.st0{fill:#1834E9;}
|
|
||||||
.st1{fill:#FFFFFF;}
|
|
||||||
.st2{font-family:'Sora-ExtraBold';}
|
|
||||||
.st3{font-size:121.1839px;}
|
|
||||||
</style>
|
|
||||||
<rect x="0.9" y="-1.2" class="st0" width="1115.1" height="481.2"/>
|
|
||||||
<g>
|
|
||||||
<text transform="matrix(1 0 0 1 278.1071 276.7521)" class="st1 st2 st3">CONTROL</text>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path class="st1" d="M251,242.7c0.1-1.2,0.1-2.3,0.1-3.5v-52.4h-22.6v52.9c0,1.1-0.1,2.1-0.2,3H251z"/>
|
|
||||||
<path class="st1" d="M217.3,256.1c-1.7,0.4-3.6,0.7-5.7,0.7c-3.6,0-6.7-0.7-9.2-2.1c-2.5-1.4-4.4-3.4-5.8-6c-1.3-2.6-2-5.6-2-9.1
|
|
||||||
v-52.9H172v52.4c0,7.9,1.5,14.8,4.6,20.6c3.1,5.8,7.6,10.3,13.4,13.4c5.9,3.2,13.1,4.7,21.6,4.7c2,0,3.8-0.1,5.7-0.3V256.1z"/>
|
|
||||||
</g>
|
|
||||||
<path class="st1" d="M242.1,256.7c-0.3,2-0.9,3.8-1.7,5.4c-1.3,2.6-3.2,4.5-5.7,5.9c-1.1,0.6-2.3,1.1-3.6,1.4V291
|
|
||||||
c6.1-0.6,11.4-2,15.9-4.5c5.9-3.2,10.3-7.6,13.4-13.4c2.5-4.7,3.9-10.2,4.4-16.4H242.1z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 8.8 KiB |
@ -1,26 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Sora:wght@400;700&display=swap"
|
|
||||||
rel="stylesheet"
|
|
||||||
/>
|
|
||||||
<link rel="stylesheet" href="style.css" />
|
|
||||||
<title>Document</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main class="welcome">
|
|
||||||
<img src="assets/logo.svg" class="title" alt="U Control" />
|
|
||||||
<div class="description">
|
|
||||||
You are one step closer <br />
|
|
||||||
<strong>more control</strong> over your data
|
|
||||||
</div>
|
|
||||||
<a href="categories.html" class="button">Get Started</a>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
</html>
|
|