Merge pull request #1204 from anapple/chromium-fun
Make chrome extensions compatible with latest API changes.
This commit is contained in:
commit
e00aa8e90b
@ -37,8 +37,8 @@ auto-update extensions on a daily basis (you can change this through the
|
|||||||
`extensions.update.interval` option in `about:config`).
|
`extensions.update.interval` option in `about:config`).
|
||||||
|
|
||||||
For an experimental Chrome extension, get the code as explained below and issue `make extension`.
|
For an experimental Chrome extension, get the code as explained below and issue `make extension`.
|
||||||
Then open Chrome with the flag `--enable-experimental-extension-apis`, go to `Tools > Extension`
|
Then open Chrome, go to `Tools > Extension` and load the (unpackaged) extension
|
||||||
and load the (unpackaged) extension from the directory `extensions/chrome`.
|
from the directory `build/chrome`.
|
||||||
|
|
||||||
### Getting the code
|
### Getting the code
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
"description": "Read PDF Document",
|
"description": "Read PDF Document",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"experimental",
|
"webRequest", "webRequestBlocking",
|
||||||
"http://*/*.pdf",
|
"http://*/*.pdf",
|
||||||
"file:///*/*.pdf"
|
"file:///*/*.pdf"
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<script>
|
<script>
|
||||||
chrome.experimental.webRequest.onBeforeRequest.addListener(
|
chrome.webRequest.onBeforeRequest.addListener(
|
||||||
function(details) {
|
function(details) {
|
||||||
var viewerPage = 'content/web/viewer.html';
|
var viewerPage = 'content/web/viewer.html';
|
||||||
var url = chrome.extension.getURL(viewerPage) + '?file=' + details.url;
|
var url = chrome.extension.getURL(viewerPage) + '?file=' + details.url;
|
||||||
|
Loading…
Reference in New Issue
Block a user