19 lines
401 B
HTML
19 lines
401 B
HTML
<!doctype html>
|
|
<script>
|
|
chrome.experimental.webRequest.onBeforeRequest.addListener(
|
|
function(details) {
|
|
var viewerPage = 'content/web/viewer.html';
|
|
var url = chrome.extension.getURL(viewerPage) + '?file=' + details.url;
|
|
return { redirectUrl: url };
|
|
},
|
|
{
|
|
urls: [
|
|
"http://*/*.pdf",
|
|
"file://*/*.pdf",
|
|
],
|
|
types: [ "main_frame" ]
|
|
},
|
|
["blocking"]);
|
|
</script>
|
|
|