mozilla/pdf.js — pull request #5230 by csillag (2014-08-22 12:34:38+00:00)
Title: Separate the page action functionality

Until now, the extension URL router and the page action code
lived in the same file.

However, some applications consuming PDF.js might want to use
one of these functionalities, but not both.

So I separated the functionalities into 3 files:
- extension-urls.js contains the common base
- extension-router.js sets up the extension URL router
- extension-pageAction sets up the page action.

All three files are now included in pdfHandler.html,

* * *

There is no new code added in this PR; it's just existing code being
separated into separate files.

The out-of-the-box functionality of the extension doesn't change;
this change only gives consuming applications
a finer grained control about which parts of functionality to
include.

* * *

There is one thing I am not sure about: what is the preferred method
of sharing symbols between these JS files?
They are all encapsulated in separate closures, so for now, I explicitly
exported two symbols into the window scope.

(If you would prefer something else, we can change that.)