mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
chrome.runtime -> chrome.extension when needed
Some Ubuntu users are still stuck at Chromium 25.
This commit is contained in:
parent
d153341927
commit
820b95416b
1 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,14 @@ limitations under the License.
|
|||
|
||||
'use strict';
|
||||
|
||||
if (!chrome.runtime) {
|
||||
// Chrome 21-
|
||||
chrome.runtime = chrome.extension;
|
||||
} else if (!chrome.runtime.onMessage) {
|
||||
// Chrome 22-25
|
||||
chrome.runtime.onMessage = chrome.extension.onMessage;
|
||||
}
|
||||
|
||||
var VIEWER_URL = chrome.runtime.getURL('content/web/viewer.html');
|
||||
var BASE_URL = VIEWER_URL.replace(/[^\/]+$/, '');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue