Last active
February 13, 2018 16:02
-
-
Save Sorebit/94707aaea1395f854d91a1ba427b79ab to your computer and use it in GitHub Desktop.
Simple popup opener for dumps and alike
This file contains 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
// Stolen from https://github.com/skilldrick/easy6502/blob/gh-pages/simulator/assembler.js | |
function openPopup(content, title) { | |
let w = window.open('', title, 'width=500,height=300,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,status=no'); | |
let html = "<html><head>"; | |
html += "<link href='style.css' rel='stylesheet' type='text/css' />"; | |
html += "<title>" + title + "</title></head><body>"; | |
html += "<pre><code>"; | |
html += content; | |
html += "</code></pre></body></html>"; | |
w.document.write(html); | |
w.document.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment