Created
January 4, 2019 23:11
-
-
Save floooh/e7b147b3acfb357c13f44dc85d47c4d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: post | |
title: "Bla" | |
--- | |
Bla bla bla bla. | |
<script type="text/javascript"> | |
function start_emu() { | |
if (!document.getElementById('emu')) { | |
let emubox = document.getElementById('emubox') | |
emubox.innerHTML = 'Close Me<br>' | |
emubox.onclick = stop_emu | |
let emu = document.createElement('iframe') | |
emubox.appendChild(emu) | |
emu.id = 'emu' | |
emu.src = 'https://floooh.github.io/tiny8bit/cpc.html?file=cpc/backtro.sna' | |
emu.style = 'border:0;' | |
emu.width = '512px' | |
emu.height = '384px' | |
} | |
} | |
function stop_emu() { | |
let emubox = document.getElementById('emubox') | |
emubox.innerHTML = 'Click Me!' | |
emubox.onclick = start_emu | |
} | |
</script> | |
<a style="cursor:pointer" id="emubox" onclick="start_emu();">Click Me!</a> | |
Blub... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment