mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
16 lines
No EOL
1.7 KiB
HTML
16 lines
No EOL
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html xmanifest="manifest.appcache">
|
|
<title>itty bitty</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<script src="src/lzma-d-min.js"></script>
|
|
<script src="data.js"></script>
|
|
<style type="text/css">
|
|
#iframe {border:none;position:absolute;top:0;left:0;width:100%;height:100%}
|
|
#edit {font-family:monospace; color:rgba(0,0,0,0.54); position:absolute;z-index:100;position:absolute;top:10px; right:10px; display:none;}
|
|
#edit:not(:hover) {text-decoration:none;}
|
|
</style>
|
|
<iframe id="iframe"></iframe>
|
|
<a id="edit">edit</a>
|
|
|
|
<script type="text/javascript">function showEdit(t){var n=document.getElementById("edit");n.href="/edit"+location.hash,n.style.display=t?"block":"none"}var HEAD_TAGS="PG1ldGEgY2hhcnNldD0idXRmLTgiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgiPjxiYXNlIHRhcmdldD0iX3RvcCI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj5ib2R5e21hcmdpbjowIGF1dG87cGFkZGluZzoxMnZtaW4gMTB2bWluO21heC13aWR0aDozNWVtO2xpbmUtaGVpZ2h0OjEuNWVtO2ZvbnQtZmFtaWx5OiAtYXBwbGUtc3lzdGVtLEJsaW5rTWFjU3lzdGVtRm9udCxzYW5zLXNlcmlmO3dvcmQtd3JhcDogYnJlYWstd29yZDt9PC9zdHlsZT4g";window.onhashchange=window.onload=function(){var t=window.location.hash.substring(1);if(t.length){var e=document.getElementById("iframe"),n=document.getElementById("edit"),d=void 0,a="?"==t.charAt(0),o=a||"!"==t.charAt(0);(o||a)&&(t=t.substring(1),d=HEAD_TAGS),0!=t.indexOf("data:")&&(t="data:text/html;charset=utf-8;"+(o?"bxze64,":"base64,")+t),n.onclick=function(){location.href="/edit"+location.hash};var i=navigator.userAgent.match(/rv:11/);decompressDataURI(t,d,function(t){t&&(i?dataToString(t,function(t){var n=e.contentWindow.document;n.open(),n.write(t),n.close()}):t&&(e.src=t))}),showEdit(a)}else location.href="/edit"}</script>
|
|
</html> |