Mar 26, '08 07:30:04AM • Contributed by: Anonymous
I have wanted to Quick Look files directly from the browser for a while (especially .doc and .ppt files). A switch to Firefox recently exacerbated this problem, as there is no PDF plug-in. So I wrote a simple script that monitors the Downloads directory and opens any new files with qlmanage, and thought others might find it useful. Copy and paste the code below into a file (say ql_downloaded.sh) and make it executable (chmod a+x ql_downloaded.sh). Launch the script in a separate Terminal window, then start browsing.
This bit -- if [[ $i == *.(pdf|ppt|xls|doc) ]]; then -- restricts which files are Quick Looked. In Firefox, the handling option for these types of files should be set to Save to Disk. The above code should work with most any browser; it works most of the time for me, but there are still some random issues once in a while (probably due to the temporary ".part" files created during downloads). Hope you find this useful!
[robg adds: This worked for me in testing with Firefox and Safari.]
