Skip to content

Instantly share code, notes, and snippets.

@Sorebit
Last active February 13, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sorebit/94707aaea1395f854d91a1ba427b79ab to your computer and use it in GitHub Desktop.
Save Sorebit/94707aaea1395f854d91a1ba427b79ab to your computer and use it in GitHub Desktop.
Simple popup opener for dumps and alike
// 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