Forked from rmtbb/ChatGPT Canvas HTML Renderer from Clipboard.url
Created
October 7, 2024 11:50
-
-
Save Fastidious/f41e75cc3b26f993f761de61ce652ab5 to your computer and use it in GitHub Desktop.
Chrome Bookmarklet the 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
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
javascript:(function(){try{navigator.clipboard.readText().then(function(clipboardText){if(clipboardText){var newWindow=window.open("","_blank","width=800,height=600");newWindow.document.open();newWindow.document.write(clipboardText);newWindow.document.close();}else{alert('Clipboard is empty. Please copy some text to the clipboard first.');}}).catch(function(err){console.error('Failed to read clipboard contents: ',err);alert('An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.');});}catch(e){console.error('An error occurred:',e);alert('An error occurred while trying to open the new window with the clipboard content.');}})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment