Display Orbot on Tor download page
Donncha O'Cearbhaill

Donncha O'Cearbhaill commited on 2016-03-01 18:12:46
Zeige 3 geänderte Dateien mit 20 Einfügungen und 2 Löschungen.


This commit adds a box on the download-easy.html.en webpage which
includes links to install Orbot.

The jquery.client.min.js script is from 2009 and does not detect
Android. I've added JS Android detection.
... ...
@@ -137,6 +137,19 @@
137 137
 	  <p class="alt-dl">Not Using GNU/Linux? Download for <a href="#mac">Mac</a> or <a href="#windows">Windows</a></p>
138 138
 	</div>
139 139
       </div>
140
+<!-- START Orbot -->
141
+      <div id="android" class="easy android">
142
+    <div class="package" style="padding-top: 13px; border-top: 0px;">
143
+      <div class="desc">
144
+        <h2>Orbot - Tor for Android</h2>
145
+        <p>Our software is available for Android-based phones, tablets, and computers from the <a href="https://guardianproject.info/">Guardian Project</a> in their <a href= "https://guardianproject.info/2012/03/15/our-new-f-droid-app-repository/">F-Droid Repository</a> or the <a href="https://play.google.com/store/apps/details?id=org.torproject.android">Google Play Store</a>.</p>
146
+        <a href="https://www.torproject.org/docs/android.html.en">Learn more &raquo;</a></p>
147
+      </div>
148
+      <form class="downloads">
149
+        <a class="button lin-orbot" href="https://guardianproject.info/apps/orbot/?src=tbb_download"><span class="strong">Download</span><span class="normal">Orbot</span></a>
150
+      </form>
151
+    </div>
152
+      </div>
140 153
       <p class="all-dl">Looking For Something Else? <a href="<page download/download>">View All Downloads</a></p>
141 154
 		<!-- END DOWNLOADS --><br>
142 155
 </div> <!-- END dow-don-left -->
... ...
@@ -313,6 +326,7 @@ the issues</a>.</p>
313 326
 <li class="dropdown"><a href="#windows">Microsoft Windows</a></li>
314 327
 <li class="dropdown"><a href="#mac">Apple OS X</a></li>
315 328
 <li class="dropdown"><a href="#linux">Linux/Unix</a></li>
329
+<li class="dropdown"><a href="#android">Android</a></li>
316 330
 <li class="dropdown"><a href="<page download/download>">All Downloads</a></li>
317 331
 </ul>
318 332
 </div>
... ...
@@ -17,6 +17,8 @@ function OScheck() {
17 17
     $('.easy.windows').css('display', 'block');
18 18
   }else if(clientos == "Mac"){
19 19
     $('.easy.mac').css('display', 'block');
20
+  }else if(clientos == "Android"){
21
+    $('.easy.android').css('display', 'block');
20 22
   }else{
21 23
     $('.easy').css('display', 'block');
22 24
   }
... ...
@@ -63,7 +65,7 @@ $(document).ready(function () {
63 65
       var url = $.param.fragment();
64 66
 
65 67
       // Toggle the '.easy' divs to off
66
-      if(url == 'windows'|url == 'mac'|url == 'linux'){
68
+      if(url == 'windows'|url == 'mac'|url == 'linux'|url == 'android'){
67 69
 
68 70
 	  $('.easy').css('display', 'none');
69 71
       }
... ...
@@ -74,6 +76,8 @@ $(document).ready(function () {
74 76
 	$('.easy.mac').css('display', 'block');
75 77
       } else if(url == 'linux'){
76 78
 	$('.easy.linux').css('display', 'block');
79
+      } else if(url == 'android'){
80
+  $('.easy.android').css('display', 'block');
77 81
       } else {
78 82
 	  $('.easy').css('display', 'none');
79 83
 	  $(function(){OScheck();});
... ...
@@ -1,4 +1,4 @@
1 1
 (function(){var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
2 2
 return data[i].identity;}
3 3
 else if(dataProp)
4
-return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();window.$.client={os:BrowserDetect.OS,browser:BrowserDetect.browser};})();
5 4
\ No newline at end of file
5
+return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"},{string:navigator.userAgent,subString:"Android",identity:"Android"}]};BrowserDetect.init();window.$.client={os:BrowserDetect.OS,browser:BrowserDetect.browser};})();
6 6