Last active
August 29, 2015 13:57
-
-
Save e-orlov/9467996 to your computer and use it in GitHub Desktop.
Bookmarklet to check Open Graph Metadata on each page. Requirement: page has JQuery loaded befor.
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:$=jQuery;if($('#myogdiv').length!==0){$('#myogdiv').hide().remove();}else{var%20myogdiv=$('<div%20id="myogdiv"/>');$('body').append(myogdiv);$('head%20meta[property^="og:"],head%20meta[property^="fb:"]').each(function(i,el){var%20k=$(el).attr('property');var%20v=$(el).attr('content');$(myogdiv).append('<div><b>'+k+':</b>'+v+'</div>');if(k=='og:image'){$(myogdiv).append('<br%20/><img%20src="'+v+'"/>');}});$(myogdiv).css('position','fixed').css('top','0').css('zIndex',99999).css('padding','0.5em').css('border','1px%20solid%20red').css('backgroundColor','white');}void(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this from here like a bookmark to your browser. Works only if JQuery is loaded. To load JQuery use something like JQuerify: http://www.learningjquery.com/2006/12/jquerify-bookmarklet/ or http://jsfiddle.net/chilly_bang/C2D6K/embedded/result/ or http://jsfiddle.net/chilly_bang/dGu4J/embedded/result/