Using a Chrome extension, I'd like to:
- Detect if the current tab has loaded a PDF file.
- Add a button to the popup.html to offer to convert the PDF into HTML5.
- Get the URL of the PDF file and send that to an online service.
To accomplish #1, I think one of the solutions on this page could work: How can I detect the current tab's mime type in a Google Chrome extension?
The problem is that I'm having trouble getting the extension to run on the PDF page itself.
How do I run background.js
of the extension on the PDF page?
My manifest file currently:
{
"matches":[
"https://*/*",
"http://*/*"
],
"run_at":"document_idle",
"css":[
"jquery-ui.css",
"resizable.css"
],
"js":[
"jquery.js",
"jquery-ui.js",
"storage.js",
"background.js"
],
"all_frames":true
}