Fixed IPv4/v6 check not working when hosted over SSL

This commit is contained in:
Matthew Connelly 2015-08-21 02:34:52 +01:00
parent f3689428a2
commit 5b76238849
1 changed files with 1 additions and 1 deletions

View File

@ -14,6 +14,6 @@
</div>
<br />
[% content %]
<script type='text/javascript'>var x4=x6=null;function ip(v){var x=new XMLHttpRequest();x.onreadystatechange=rt;x.open('GET','http://ip'+v+'.pts0.eu/',true);x.send(null);v==6? x6=x : x4=x;};function rt(){if(x4!=null&&x4.status===200){document.getElementById('addr').textContent=x4.responseText;};if(x6!=null&&x6.status===200){document.getElementById('addr6').textContent=x6.responseText;}};ip(4);ip(6);</script>
<script type='text/javascript'>var x4=x6=null;function ip(v){var x=new XMLHttpRequest();x.onreadystatechange=rt;x.open('GET',location.protocol+'//ip'+v+'.maff.scot/',true);x.send(null);v==6? x6=x : x4=x;};function rt(){if(x4!=null&&x4.status===200){document.getElementById('addr').textContent=x4.responseText;};if(x6!=null&&x6.status===200){document.getElementById('addr6').textContent=x6.responseText;}};ip(4);ip(6);</script>
</body>
</html>