2011-10-19 02:43:43 +09:00
|
|
|
<!doctype html>
|
|
|
|
<script>
|
|
|
|
chrome.experimental.webRequest.onBeforeRequest.addListener(
|
|
|
|
function(details) {
|
2011-11-08 00:01:50 +09:00
|
|
|
var viewerPage = 'content/web/viewer.html';
|
|
|
|
var url = chrome.extension.getURL(viewerPage) + '?file=' + details.url;
|
2011-10-19 02:43:43 +09:00
|
|
|
return { redirectUrl: url };
|
|
|
|
},
|
|
|
|
{
|
|
|
|
urls: [
|
|
|
|
"http://*/*.pdf",
|
|
|
|
"file://*/*.pdf",
|
|
|
|
],
|
|
|
|
types: [ "main_frame" ]
|
|
|
|
},
|
|
|
|
["blocking"]);
|
|
|
|
</script>
|
|
|
|
|