3 ms·
It also works as its own page: http://docs.google.com/gview?url= http://docs.google.com/gview?url= Does anyone know if firefox extensions can register as handl
by blasdel 17y ago
It also works as its own page: http://docs.google.com/gview?url= http://docs.google.com/gview?url=
Does anyone know if firefox extensions can register as handlers for MIME types, or if they're restricted to diddling with chrome / pre-existing pages? It'd be really easy to write a WebKit plugin to do it, but not very useful since Safari ships with a flawless PDFKit-based viewer.
I want to get this working in Firefox, but NPAPI plugins are really gross. It looks doable that way, as it appears that a naked nsplugin still gets a DOM and everything, so I could just immediately set window.location.href and be done with it.
- thristian 17y agoIt sounds like you're looking for window.navigator.registerContentHandler: https://developer.mozilla.org/en/DOM/window.navigator.registerContentHandler ...except a website can only register themselves as a content-handler. You could probably hack up a bookmarklet to do it, if you can't find an XSS vector, but I can't seem to make it work myself.
- blasdel 17y agoSo... close... It'd be easy to make a greasemonkey-style extension that calls this on *, but it wouldn't work for links to other domains (which I'd bet are the majority of PDF links)
- jacquesm 17y agoThat would already be very useful though, for things like online papers and datasheets, which as a rule sit on the same server as the page you're looking at.
- legooolas 17y agoIt's becoming more common to use a separate domain for static content like this to be cached more effectively (and to have no cookies etc sent), so it may not always be the same server as the page you're looking at.