Open RokeJulianLockhart opened 1 month ago
This extension does not actively limit functionality on specific pages. If necessary permissions are lacking for a particular page, related features will be unavailable.
Highlighting should have basic support, like: pdf.
However, copying doesn't work due to tabs.executeScript(), and I'm unsure if there are other solutions.
If permission issues can be resolved, the effect should still be acceptable (unless PDF loading exceeds 5 seconds, the extension will abandon the search), like: pdf.js.
Currently, a possible solution would be to embed a PDF viewer within this extension, but I believe this feature exceeds the scope of this extension.
https://github.com/ichaoX/ext-textFragment/issues/5#issuecomment-2217746215
@ichaoX, https://mozilla.github.io/pdf.js/legacy/web/compressed.tracemonkey-pldi-09.pdf#:~:text=dynamic%20compiler%20for-,JavaScript,-based%20on%20our doesn't work for me. Should the extension automatically highlight the selected text after the PDF is downloaded?
A PDF viewer would indeed set a somewhat untennable precedent, considering how many formats Firefox and Chrome support which can contain text.
Should the extension automatically highlight the selected text after the PDF is downloaded?
My setting is to open PDFs using the browser's built-in PDF viewer by default, while this extension uses the Find API for highlighting.
This avoids the need to download the file first and then open it in the browser, which would otherwise lose the URL's #:~:text=
.
https://github.com/ichaoX/ext-textFragment/issues/5#issuecomment-2217854576
@ichaoX, could you show a screencast of how you do it? By the way, I uploaded the wrong one there - that must have seemed incoherent. I've fixed it:
https://github.com/ichaoX/ext-textFragment/assets/42837531/65380757-a404-444b-985c-0d0f9421067e
Alternatively, you can try appending #:~:text=*
to the file:///*.pdf
.
https://github.com/ichaoX/ext-textFragment/issues/5#issuecomment-2218160430
@ichaoX, how do you generate that fragment without the extension functioning, though? Is it enough to copy some of the file content and put it through https://meyerweb.com/eric/tools/dencoder/ and append it to #:~:text=
?
@ichaoX, how do you generate that fragment without the extension functioning, though? Is it enough to copy some of the file content and put it through https://meyerweb.com/eric/tools/dencoder/ and append it to
#:~:text=
?
There is currently no simple way to achieve this.
I'm unsure if there are other ways to write to the clipboard. Even if copying is done through additional steps, due to the lack of get context capabilities, features such as creating links and finding text fragments remain degraded.
This might explain why this doesn't appear to work in PDFs.