[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake/master] Fix whitespace to match conventions
commit 58d07788c794734bfdf2a1bc64f22b4d244a6cb2
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date: Tue Jul 2 09:56:47 2019 -0400
Fix whitespace to match conventions
---
proxy/webext/popup.css | 26 +++++++++++++-------------
proxy/webext/popup.html | 44 ++++++++++++++++++++++----------------------
proxy/webext/popup.js | 42 +++++++++++++++++++++---------------------
3 files changed, 56 insertions(+), 56 deletions(-)
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 @@
<!doctype html>
<html>
- <head>
- <meta charset="utf-8" />
- <link rel="stylesheet" href="popup.css" />
- <script src="popup.js"></script>
- </head>
- <body>
- <div id="active">
- <img src="icons/status-off.png" />
- <p></p>
- <p></p>
- </div>
- <div class="b toggle">
- <label id=toggle>Turn On</label>
- <label class="switch">
- <input id="enabled" type="checkbox"/>
- <span class="slider round"></span>
- </label>
- </div>
- <div class="b learn">
- <a target="_blank" href="https://snowflake.torproject.org/">Learn more</a>
- </div>
- </body>
+ <head>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="popup.css" />
+ <script src="popup.js"></script>
+ </head>
+ <body>
+ <div id="active">
+ <img src="icons/status-off.png" />
+ <p></p>
+ <p></p>
+ </div>
+ <div class="b toggle">
+ <label id=toggle>Turn On</label>
+ <label class="switch">
+ <input id="enabled" type="checkbox"/>
+ <span class="slider round"></span>
+ </label>
+ </div>
+ <div class="b learn">
+ <a target="_blank" href="https://snowflake.torproject.org/">Learn more</a>
+ </div>
+ </body>
</html>
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});
})
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits