This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
intergalactic/index.html

32 lines
1.3 KiB
HTML

<html>
<head>
<title>Sample App</title>
</head>
<body>
<script>
// From https://github.com/LZMA-JS/LZMA-JS (lzma-d.js)
/*var e=function(){"use ...*/
// Data portion made with: webpack && cat dist/bundle.js | lzma | base64 -w 0
// IDEA: Load this from a CDN (unpkg.com?), and only resort to the local copy if the CDN copy doesn't load.
var compressed_javascript = "data:application/octet-stream;base64,XQAAgAD..."
document.body.insertAdjacentHTML('beforeend', new Date() + 'start<br />');
fetch(compressed_javascript).then(response => {
document.body.insertAdjacentHTML('beforeend', new Date() + 'decompressed<br />');
compressed_javascript = null
return response.arrayBuffer()
}).then(buffer => {
LZMA.decompress(new Uint8Array(buffer), function(result, error) {
document.body.insertAdjacentHTML('beforeend', new Date() + 'starting eval<br />');
buffer = null
eval(result)
})
})
// For conversion of this file to data URI, run: cat index.html | python -c "import urllib, sys; print urllib.quote(sys.stdin.read())"
// Then prepend with: "data:text/html;charset=utf-8,"
</script>
</body>
</html>