[tor-commits] [snowflake/master] begin options page for proxy #21

serene at torproject.org serene at torproject.org
Tue Jan 3 05:01:37 UTC 2017


commit f2bbf80c7d14cd07890b8d71def2b62d2b296904
Author: Serene H <git at keroserene.net>
Date:   Mon Jan 2 13:41:28 2017 -0800

    begin options page for proxy #21
---
 proxy/static/options.html | 123 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 123 insertions(+)

diff --git a/proxy/static/options.html b/proxy/static/options.html
new file mode 100644
index 0000000..e71650e
--- /dev/null
+++ b/proxy/static/options.html
@@ -0,0 +1,123 @@
+<!doctype html>
+<html>
+<head>
+  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
+  <script type="text/javascript" src="modernizr.js"></script>
+  <script type="text/javascript" src="snowflake.js"></script>
+  <title>Snowflake - Options</title>
+  <style>
+  * {
+    box-sizing: border-box;
+    -webkit-transition: all 0.3s;
+    -moz-transition: all 0.3s;
+    transition: all 0.3s;
+  }
+  body {
+    position: absolute;
+    width: 100%; height: 100%; top: 0; margin: 0 auto;
+    background-color: #424;
+    color: #000;
+    font-size: 1rem;
+    text-align: center;
+    font-family: monospace;
+    background-image: url('koch.jpg');
+  }
+  .options {
+    background-color: rgba(0,0,0,0.8);
+    color: #fff;
+    resize: none;
+    position: relative; border: none;
+    width: 30rem; min-width: 40em;
+    padding: 3rem; margin: auto; margin-top: 1rem;
+  }
+  .active { background-color: rgba(0,50,0,0.8); }
+  #msglog {
+    display: block;
+    width: 100%;
+    min-height: 40em;
+    margin-bottom: 1em;
+    padding: 8px;
+  }
+  .inputarea {
+    position: relative;
+    width: 100%;
+    height: 3em;
+    display: block;
+  }
+  #input {
+    display: inline-block;
+    position: absolute; left: 0;
+    width: 89%; height: 100%;
+    padding: 8px 30px;
+    font-size: 80%;
+    color: #fff;
+    background-color: rgba(0,0,0,0.9);
+    border: 1px solid #999;
+  }
+  #send {
+    display: inline-block; position: absolute;
+    right: 0; top: 0;  height: 100%; width: 10%;
+    background-color: #202; color: #f8f;
+    font-variant: small-caps; font-size: 100%;
+    border: none; // box-shadow: 0 2px 5px #000;
+  }
+  #send:hover { background-color: #636; }
+  #status {
+    background-color: rgba(0,0,0,0.9);  color: #999;
+    margin: 8px 0; padding: 8px 1em; cursor: default;
+    text-align: left;
+  }
+  </style>
+</head>
+<body>
+  <div class="options">
+  <h1>Snowflake Options</h1>
+  <p>
+  This page enables you to use your web browser as a proxy to help other
+  Internet users in censored places.
+  When you click yes, your browser will act as a
+  censorship circumvention proxy
+  as long as you are viewing a page with the snowflake badge.
+  </p>
+
+  <p>
+  For more information on this system click
+  <a href="keroserene.net/snowflake">here</a>.
+  </p>
+
+  <noscript>
+  Volunteering as a snowflake proxy requires javascript to be enabled.
+  </noscript>
+  <p>
+  Do you want your browser to act as a proxy?
+  </p>
+
+  <p>
+  <button onclick="enable()">
+    Yes
+  </button>
+  <button onclick="disable()">
+    No
+  </button>
+  </p>
+
+  <div id="snowflake-status">
+  </div>
+
+<script>
+
+var COOKIE_NAME = 'snowflake-allow'
+
+function readCookie(cookie) {
+  c = document.cookies.split('; ');
+  cookies = {};
+  for (i = 0 ; i < c.length ; i++) {
+    pair = c[i].split('=')
+    cookies[pair[0]] = pair[1]q
+  }
+  return cookies[cookie];
+}
+
+</script>
+</body>
+</html>





More information about the tor-commits mailing list