I noticed this Todo: open Office documents directly.
Office (and Libre Office) install URI schemes for Office documents. They bypass the Chrome file link restriction. So rewriting the links with the document-specific URI scheme in front should accomplish this goal. For example:
Chrome behavior (without plugin)
File link: file:///C:/test.docx -- doesn't open
Word link: ms-word:ofv|u|file:///C:/test.docx -- opens directly in Word
If the computer does not have registered handlers (i.e. Office is not installed), these links will be ignored and a console error will be logged. So it would be ideal to rewrite the links only if there are registered handlers. So the plugin will still allow them to be downloaded if Office is not installed.
I noticed this Todo: open Office documents directly.
Office (and Libre Office) install URI schemes for Office documents. They bypass the Chrome file link restriction. So rewriting the links with the document-specific URI scheme in front should accomplish this goal. For example:
Chrome behavior (without plugin)
file:///C:/test.docx
-- doesn't openms-word:ofv|u|file:///C:/test.docx
-- opens directly in WordThe Office document schemes can be found here.
Caveats
If the computer does not have registered handlers (i.e. Office is not installed), these links will be ignored and a console error will be logged. So it would be ideal to rewrite the links only if there are registered handlers. So the plugin will still allow them to be downloaded if Office is not installed.