Insert dummy content script at every location.
This is needed for propagating the extension's permissions to the extension's iframe, in the rare event that the PDF is loaded in a sub frame, and the extension does not have access to the top frame. For instance, when a http:-PDF file is embedded in a local file, while "Allow access to local URLs" is disabled. Note: Propagating permissions by inserting content scripts is an undocumented feature (http://crbug.com/302548). Whenever it breaks, the issue (cross-domain permissions for XHR) can be solved by using a content script that gets the blob using the XMLHttpRequest API, followed by `postMessage` (via transferables) to efficiently pass the arraybuffer back to the PDF Viewer.
This commit is contained in:
parent
cdadb0db4d
commit
32313b9149
@ -22,7 +22,12 @@
|
||||
*/
|
||||
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4zyYTii0VTKI7W2U6fDeAvs3YCVZeAt7C62IC64IDCMHvWy7SKMpOPjfg5v1PgYkFm+fGsCsVLN8NaF7fzYMVtjLc5bqhqPAi56Qidrqh1HxPAAYhwFQd5BVGhZmh1fySHXFPE8VI2tIHwRrASOtx67jbSEk4nBAcJz6n+eGq8QIDAQAB",
|
||||
"content_scripts": [{
|
||||
"matches": ["file://*/*"],
|
||||
"matches": [
|
||||
"http://*/*",
|
||||
"https://*/*",
|
||||
"ftp://*/*",
|
||||
"file://*/*"
|
||||
],
|
||||
"js": ["nothing.js"]
|
||||
}],
|
||||
"mime_types": [
|
||||
|
Loading…
Reference in New Issue
Block a user