Skip to content Skip to sidebar Skip to footer

How To Get The Url Of A Pdf File From A Google Chrome Extension

Last year I developed a google extension that worked on PDF files. I used the following function in order to get the URL of the PDF file: function getPDFUrl(): String { const e

Solution 1:

Apparently PDF is now viewed through an internal chrome extension chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/.

Aside from using window.location.href you can use document.getElementsByTagName("embed")[0].baseURI

Post a Comment for "How To Get The Url Of A Pdf File From A Google Chrome Extension"