pdf.js/extensions/chrome/pdfHandler.html
2011-10-18 19:43:43 +02:00

18 lines
360 B
HTML

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