<script>
 function get(url){
     $('#loadingDiv').show();
     $('#msg').html("")
     $.get(url, function(data) {
         $('#msg').html(data);
         $('#loadingDiv').hide();
     }).done(function(data) {
     }).fail(function(data) {
         alert("Failed:" + JSON.serialize(data));
     })
 }

 var loading = $('#loadingDiv').hide();
 $(document).ready(function() {
     $('#loadingDiv').hide();
 });
 
</script>
<div class="container isdi-page">
    <div>
    <h4 class="display-4"> Privacy Checkup <a href="#" style="font-size: 20px" onclick="close_window('close the privacy checkup?');return false;">close the privacy checkup</a>
        </h4>
        <h3>Android</h3>
	<img class="content-image" src="/webstatic/images/android.resiz.png">
	<br><br>
    <div class="button-cluster">
            {% for k, v in  {"account": "Account", "sync": "Accounts and Sync", "backup": "Backup account", "gmap": "Google Map Sharing", "gphotos": "Google Photos Sharing"}.items() %}
            <button class="btn btn-primary mx-2"  onclick="get('/privacy/android/{{ k }}')" value="{{ k }}">{{ v | title }}</button>
            {% endfor %}
            <button class="btn btn-secondary mx-2"  onclick="get('/privacy/android/screenshot')" value="screenshot">Screenshot</button>      
        </div>
        <div class="jumbotron" id="msg">
        </div>
	<br><br>
        <div id="loadingDiv" align="center"><img src="{{ url_for('static', filename='images/waiting.gif') }}"/></div>
	<br><br>

        <h3>iOS (iPhone/iPad)</h3>
    <img class="content-image" src="/webstatic/images/apple.resized.png">
	<br><br>
        <div class="jumbotron">
            Please go to 
            <li> <code>Settings</code> &rarr;
                <ul>
                    <li><code>"Your Name"</code> &rarr; Check the email address at the top of the screen. </li>
                    <li><code>Privacy</code> &rarr; <code>Location Services</code> &rarr;
                        <ul>
                            <li> <code>Share My Location</code> &rarr; Check whith whom you are sharing your location. </li>
                            <li> <code>System Services</code> &rarr;  <code>Significant Locations</code> &rarr; (Turn this always off.)</li>
                        </ul>
                    </li>
                </ul>
            </li>
            <li> Check the location sharing  in <code>Find my Friends</code> app.</li>
        </div>
    </div>
</div>
