diff --git a/proxy/webext/popup.css b/proxy/webext/popup.css
index 479d2f4..332092d 100644
--- a/proxy/webext/popup.css
+++ b/proxy/webext/popup.css
@@ -1,13 +1,13 @@
body {
- margin: 10px;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
- width: 300px;
- font-size:12px;
+ margin: 10px;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
+ width: 300px;
+ font-size:12px;
}
#active {
- margin: 20px 0;
- text-align: center;
+ margin: 20px 0;
+ text-align: center;
}
.b {
@@ -18,8 +18,8 @@ body {
.b a {
color: black;
- display: inline-block;
- text-decoration: none;
+ display: inline-block;
+ text-decoration: none;
}
.learn:before {
@@ -40,11 +40,11 @@ body {
/* Snowflake Status */
.transfering {
- -webkit-animation:spin 8s linear infinite;
- -moz-animation:spin 8s linear infinite;
- animation:spin 8s linear infinite;
+ -webkit-animation:spin 8s linear infinite;
+ -moz-animation:spin 8s linear infinite;
+ animation:spin 8s linear infinite;
- fill: BlueViolet;
+ fill: BlueViolet;
}
@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
@@ -67,7 +67,7 @@ body {
height: 0;
}
- .slider {
+.slider {
position: absolute;
cursor: pointer;
top: 0;
diff --git a/proxy/webext/popup.html b/proxy/webext/popup.html
index c32a5f8..1074333 100644
--- a/proxy/webext/popup.html
+++ b/proxy/webext/popup.html
@@ -1,25 +1,25 @@
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
diff --git a/proxy/webext/popup.js b/proxy/webext/popup.js
index b926f75..c447b86 100644
--- a/proxy/webext/popup.js
+++ b/proxy/webext/popup.js
@@ -1,29 +1,29 @@
const port = chrome.runtime.connect({
- name: "popup"
+ name: "popup"
});
port.onMessage.addListener((m) => {
- const active = m.active;
- const div = document.getElementById('active');
- const img = div.querySelector('img');
- const enabled = m.enabled
- img.src = `icons/status-${enabled ? "on" : "off"}.png`;
- const ps = div.querySelectorAll('p');
- const clients = active ? 1 : 0;
- const enabledText = document.getElementById('toggle');
- if (enabled) {
- document.getElementById('enabled').checked = true;
- enabledText.innerText = 'Turn Off';
- ps[0].innerText = `${clients} client${(clients !== 1) ? 's' : ''} connected.`;
- ps[1].innerText = `Your snowflake has helped ${m.total} user${(m.total !== 1) ? 's' : ''} circumvent censorship in the last 24 hours.`;
- } else {
- ps[0].innerText = "Snowflake is off";
- ps[1].innerText = "";
- document.getElementById('enabled').checked = false;
- enabledText.innerText = 'Turn On';
- }
+ const active = m.active;
+ const div = document.getElementById('active');
+ const img = div.querySelector('img');
+ const enabled = m.enabled
+ img.src = `icons/status-${enabled ? "on" : "off"}.png`;
+ const ps = div.querySelectorAll('p');
+ const clients = active ? 1 : 0;
+ const enabledText = document.getElementById('toggle');
+ if (enabled) {
+ document.getElementById('enabled').checked = true;
+ enabledText.innerText = 'Turn Off';
+ ps[0].innerText = `${clients} client${(clients !== 1) ? 's' : ''} connected.`;
+ ps[1].innerText = `Your snowflake has helped ${m.total} user${(m.total !== 1) ? 's' : ''} circumvent censorship in the last 24 hours.`;
+ } else {
+ ps[0].innerText = "Snowflake is off";
+ ps[1].innerText = "";
+ document.getElementById('enabled').checked = false;
+ enabledText.innerText = 'Turn On';
+ }
});
document.addEventListener('change', (event) => {
- port.postMessage({enabled: event.target.checked});
+ port.postMessage({enabled: event.target.checked});
})