<!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>


<!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>


Add content/ to the viewer.html path
Add content/ to the viewer.html path
