linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Support translate PDF and any `file:///` content

Open vitonsky opened this issue 1 year ago • 2 comments

Enable content script on local files

vitonsky avatar Apr 22 '23 09:04 vitonsky

Related links

  • PDF translation feature links: https://github.com/artemave/translate_onhover/issues/26

vitonsky avatar Apr 22 '23 10:04 vitonsky

It looks PDF handled by native code, so extension cannot to embed content script there.

Exists workarounds just intercept handling of PDF documents and render it by itself.

Sources

  • https://discourse.mozilla.org/t/content-script-not-run-for-pdf-pages/33660
  • https://stackoverflow.com/questions/65971615/chrome-extension-inject-content-script-when-viewing-a-pdf
  • https://www.reddit.com/r/FirefoxAddons/comments/ofjdcf/is_it_possible_to_inject_contentscript_into_the/

vitonsky avatar Apr 25 '23 00:04 vitonsky