September 10, 2009
Embeddable Google Document Viewer
“Google Docs offers an undocumented feature that lets you embed PDF files and PowerPoint presentations in a web page. The files don’t have to be uploaded to Google Docs, but they need to be available…
A bookmarklet that opens all linked pdfs to take advantage of this:
javascript:(function(){dl=document.links;for(i=0;i<dl.length;++i){if(dl[i].href.substr(-4)==".pdf"){window.open("http://docs.google.com/gview?embedded=true&url="+dl[i].href);}}})()
or to just transform links:
javascript:(function(){dl=document.links;for(i=0;i<dl.length;++i){if(dl[i].href.substr(-4)==".pdf"){dl[i].href="http://docs.google.com/gview?embedded=true&url=+dl[i].href;}}})()
or a greasemonkey userscript: http://userscripts.org/scripts/show/57453
(via: http://news.ycombinator.com/item?id=814642 )