Skip to content

Instantly share code, notes, and snippets.

View ashtonmeuser's full-sized avatar

Ashton Meuser ashtonmeuser

  • Dialpad
  • Vancouver, BC
View GitHub Profile
@ashtonmeuser
ashtonmeuser / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active January 23, 2025 03:55 — forked from rmtbb/ChatGPT Canvas HTML Renderer from Clipboard.url
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard