1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

[CRX] Replace deprecated extension.getURL with runtime.getURL

This commit is contained in:
Rob Wu 2024-09-01 21:38:01 +02:00
parent b23829fc60
commit 23bc46d51a
3 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ limitations under the License.
"use strict";
var VIEWER_URL = chrome.extension.getURL("content/web/viewer.html");
var VIEWER_URL = chrome.runtime.getURL("content/web/viewer.html");
function getViewerURL(pdf_url) {
return VIEWER_URL + "?file=" + encodeURIComponent(pdf_url);

View file

@ -17,8 +17,8 @@ limitations under the License.
"use strict";
(function ExtensionRouterClosure() {
var VIEWER_URL = chrome.extension.getURL("content/web/viewer.html");
var CRX_BASE_URL = chrome.extension.getURL("/");
var VIEWER_URL = chrome.runtime.getURL("content/web/viewer.html");
var CRX_BASE_URL = chrome.runtime.getURL("/");
var schemes = [
"http",

View file

@ -16,7 +16,7 @@ limitations under the License.
"use strict";
var VIEWER_URL = chrome.extension.getURL("content/web/viewer.html");
var VIEWER_URL = chrome.runtime.getURL("content/web/viewer.html");
function getViewerURL(pdf_url) {
// |pdf_url| may contain a fragment such as "#page=2". That should be passed