Add dynamic apple instructions

This commit is contained in:
Ritiek Malhotra 2017-05-07 02:07:41 +05:30 committed by GitHub
parent fdec51d732
commit 39356e8f34

View File

@ -1,32 +1,10 @@
{% extends "frame.html" %} {% extends "frame.html" %}
{% block body %} {% block body %}
<center> <script>
<h2> Click to install the mitmproxy certificate: </h2> function changeTo(device) {
</center> if (device == "apple") {
<div id="certbank" class="row"> var text = `<h3>Apple: How to install on macOS / OSX</h3>
<div class="col-md-3">
<a href="/cert/pem"><i class="fa fa-apple fa-5x"></i></a>
<p>Apple</p>
</div>
<div class="col-md-3">
<a href="/cert/p12"><i class="fa fa-windows fa-5x"></i></a>
<p>Windows</p>
</div>
<div class="col-md-3">
<a href="/cert/pem"><i class="fa fa-android fa-5x"></i></a>
<p>Android</p>
</div>
<div class="col-md-3">
<a href="/cert/pem"><i class="fa fa-asterisk fa-5x"></i></a>
<p>Other</p>
</div>
</div>
<hr/>
<div class="text-left">
<h3>Apple: How to install on macOS / OSX</h3>
<ul> <ul>
<li>Download PEM file (from above link)</li> <li>Download PEM file (from above link)</li>
<li>Double-click the PEM file</li> <li>Double-click the PEM file</li>
@ -36,11 +14,49 @@
<li>A dialog window openes up</li> <li>A dialog window openes up</li>
<li>Change "Secure Socket Layer (SSL)" to "Always Trust"</li> <li>Change "Secure Socket Layer (SSL)" to "Always Trust"</li>
<li>Close the dialog window (and enter your password if prompted)</li> <li>Close the dialog window (and enter your password if prompted)</li>
<li>Go to Settings > General > About > Certificate Trust Settings and enable full trust for your certificate</li>
<li>Done!</li> <li>Done!</li>
</ul> </ul>`;
}
else if (device == "windows") {
var text = "hi";
}
else if (device == "android") {
var text = "hi";
}
else if (device == "asterisk") {
var text = "hi";
}
document.getElementById("dynamic").innerHTML = text;
}
</script>
<center>
<h2> Click to install the mitmproxy certificate: </h2>
</center>
<div id="certbank" class="row">
<div class="col-md-3">
<a onclick="changeTo('apple')" href="/cert/pem"><i class="fa fa-apple fa-5x"></i></a>
<p>Apple</p>
</div>
<div class="col-md-3">
<a onclick="changeTo('windows')" href="/cert/p12"><i class="fa fa-windows fa-5x"></i></a>
<p>Windows</p>
</div>
<div class="col-md-3">
<a onclick="changeTo('android')" href="/cert/pem"><i class="fa fa-android fa-5x"></i></a>
<p>Android</p>
</div>
<div class="col-md-3">
<a onclick="changeTo('asterisk')" href="/cert/pem"><i class="fa fa-asterisk fa-5x"></i></a>
<p>Other</p>
</div>
</div> </div>
<hr/>
<div class="text-left" id="dynamic">
</div>
<hr/> <hr/>