d9f90d595d
When a blob or data-URL is opened with the extension, viewer.html rewrites the URL. But when the viewer is refreshed (e.g. F5), Chrome would fail to display the viewer because the extension router was not set up to recognize such URLs. Now it is.
72 lines
1.5 KiB
JSON
72 lines
1.5 KiB
JSON
{
|
|
"manifest_version": 2,
|
|
"name": "PDF Viewer",
|
|
"version": "PDFJSSCRIPT_VERSION",
|
|
"description": "Uses HTML5 to display PDF files directly in the browser.",
|
|
"icons": {
|
|
"128": "icon128.png",
|
|
"48": "icon48.png",
|
|
"16": "icon16.png"
|
|
},
|
|
"permissions": [
|
|
"fileBrowserHandler",
|
|
"webRequest", "webRequestBlocking",
|
|
"<all_urls>",
|
|
"tabs",
|
|
"webNavigation",
|
|
"storage"
|
|
],
|
|
"content_scripts": [{
|
|
"matches": [
|
|
"http://*/*",
|
|
"https://*/*",
|
|
"ftp://*/*",
|
|
"file://*/*"
|
|
],
|
|
"run_at": "document_start",
|
|
"all_frames": true,
|
|
"css": ["contentstyle.css"],
|
|
"js": ["contentscript.js"]
|
|
}],
|
|
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
|
"file_browser_handlers": [{
|
|
"id": "open-as-pdf",
|
|
"default_title": "Open with PDF Viewer",
|
|
"file_filters": [
|
|
"filesystem:*.pdf"
|
|
]
|
|
}],
|
|
"storage": {
|
|
"managed_schema": "preferences_schema.json"
|
|
},
|
|
"options_ui": {
|
|
"page": "options/options.html",
|
|
"chrome_style": true
|
|
},
|
|
"options_page": "options/options.html",
|
|
"background": {
|
|
"page": "pdfHandler.html"
|
|
},
|
|
"page_action": {
|
|
"default_icon": {
|
|
"19": "icon19.png",
|
|
"38": "icon38.png"
|
|
},
|
|
"default_title": "Show PDF URL",
|
|
"default_popup": "pageActionPopup.html"
|
|
},
|
|
"incognito": "split",
|
|
"web_accessible_resources": [
|
|
"content/web/viewer.html",
|
|
"http:/*",
|
|
"https:/*",
|
|
"ftp:/*",
|
|
"file:/*",
|
|
"chrome-extension:/*",
|
|
"blob:*",
|
|
"data:*",
|
|
"filesystem:/*",
|
|
"drive:*"
|
|
]
|
|
}
|