Created
January 10, 2015 10:58
-
-
Save cocoabox/84747f28e6c124d7fc79 to your computer and use it in GitHub Desktop.
bookmarklet to download g+ pics in original resolution
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:var last_url='';var l = document.getElementsByTagName('div');var cnt = 0;for (var i = 0; i < l.length; ++i) { var s = l[i].getAttribute('style');if ('string'!== typeof s || !s) {continue;}s = s.replace(/\s+/g, '').toLowerCase(); if ((-1<s.indexOf('opacity:1;') ||-1<s.indexOf('z-index:0;'))&&s.match(/height:[0-9]+/g)&&s.match(/width:[0-9]+/g)) { var im = l[i].getElementsByTagName('img'); if (im && im.length) { for (var j = 0; j < im.length; ++j) {var u='https:' + im[j].getAttribute('src');if(u && 'string'===typeof u && u.indexOf('gstatic.com')==-1 && (u.indexOf('.jpg')>-1 || u.indexOf('.png'>-1))){u = u.replace(/w[0-9]+\-h[0-9]+/g,'w9999-h9999');if(u!=last_url){window.open(u,'img_window');last_url = u;++cnt;}} } } }}if(!cnt) {alert('SORRY');} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment