Skip to content

Instantly share code, notes, and snippets.

@hirayama-evolni
Last active March 6, 2018 11:32
Show Gist options
  • Save hirayama-evolni/5941844 to your computer and use it in GitHub Desktop.
Save hirayama-evolni/5941844 to your computer and use it in GitHub Desktop.
A bookmarklet for check the HTML with html-inspector( https://github.com/philipwalton/html-inspector ). Caution: May not work on all browsers for security restrictions.
void function(t){if(t.HTMLInspector!=null){t.HTMLInspector.inspect()}else{var e=document.getElementsByTagName("head")[0]||document.documentElement;var n=document.createElement("script");n.type="text/javascript";n.src="https://rawgithub.com/philipwalton/html-inspector/master/dist/html-inspector.js";n.onload=function(){t.HTMLInspector.inspect()};e.appendChild(n)}}(window);
;void((function(w){
if(w.HTMLInspector != null){
w.HTMLInspector.inspect();
} else {
var head =
document.getElementsByTagName('head')[0] ||
document.documentElement;
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://rawgithub.com/philipwalton/html-inspector/master/dist/html-inspector.js';
script.onload = function(){
w.HTMLInspector.inspect();
};
head.appendChild(script);
}
})(window));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment