Skip to content

Commit

Permalink
[CRX] Replace deprecated extension.getURL with runtime.getURL
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob--W committed Sep 8, 2024
1 parent fecd50a commit 84e4ac6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extensions/chromium/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions extensions/chromium/extension-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion extensions/chromium/pdfHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84e4ac6

Please sign in to comment.