Last active
August 29, 2015 13:58
-
-
Save chriscorwin/9957296 to your computer and use it in GitHub Desktop.
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() { | |
window.nodes; | |
window.timeoutLength = 200; | |
var po = document.createElement('script'); | |
po.type = 'text/javascript'; | |
po.async = true; | |
if (window.location.protocol !== 'https:') { | |
po.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"; | |
} else { | |
po.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"; | |
window.timeoutLength = 600; | |
} | |
var s = document.getElementsByTagName('body')[0]; | |
s.parentNode.appendChild(po, s); | |
function copyToClipboard() { | |
window.prompt("Copy and paste this into console to get source:", "copy(nodes);"); | |
} | |
function runIt(){ | |
jQuery.noConflict(); | |
printHTML(); | |
}; | |
function printHTML() { | |
window.nodes = jQuery('body').html(); | |
console.group('Source:'); | |
console.log(window.nodes); | |
console.groupEnd(); | |
copyToClipboard(); | |
} | |
var timeoutID = window.setTimeout(runIt, window.timeoutLength); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment