Created
October 31, 2014 13:27
-
-
Save mscalora/c9833db193d47d546195 to your computer and use it in GitHub Desktop.
Create a link to download the inner HTML of the body without script or noscript elements
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
$('<a download="body-html.html">Download Body HTML</a>').attr('href','data:text/html,'+encodeURIComponent($('body').clone().find('script, noscript').remove().end().html())).prependTo('body') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment