Last active
December 9, 2022 20:19
-
-
Save boriskaiser/d3835111498ae0ea09f2 to your computer and use it in GitHub Desktop.
HTMLInspector Snippet for Google Chrome
This file contains hidden or 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
function _loadScript(url, callback) { | |
// Adding the script tag to the head as suggested before | |
var head = document.getElementsByTagName('head')[0]; | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = url; | |
// Then bind the event to the callback function. | |
script.onload = callback; | |
// Fire the loading | |
head.appendChild(script); | |
} | |
var HTMLInspector = { | |
url: '//cdnjs.cloudflare.com/ajax/libs/html-inspector/0.8.1/html-inspector.js', | |
init: function () { | |
HTMLInspector.inspect(); | |
} | |
}; | |
_loadScript(HTMLInspector.url, HTMLInspector.init); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment