diff --git a/src/background.js b/src/background.js index 8b1e85d..ec7e829 100644 --- a/src/background.js +++ b/src/background.js @@ -139,7 +139,7 @@ async function updateMatchingPasswordsCount(tabId, forceRefresh = false) { try { const tab = await chrome.tabs.get(tabId); - badgeCache.settings.origin = new URL(tab.url).origin; + badgeCache.settings.origin = new BrowserpassURL(tab.url).origin; } catch (e) { throw new Error(`Unable to determine domain of the tab with id ${tabId}`); } @@ -395,7 +395,7 @@ async function fillFields(settings, login, fields) { // build fill request var fillRequest = { - origin: new URL(settings.tab.url).origin, + origin: new BrowserpassURL(settings.tab.url).origin, login: login, fields: fields }; @@ -482,7 +482,7 @@ async function fillFields(settings, login, fields) { // build focus or submit request let focusOrSubmitRequest = { - origin: new URL(settings.tab.url).origin, + origin: new BrowserpassURL(settings.tab.url).origin, autoSubmit: getSetting("autoSubmit", login, settings), filledFields: filledFields }; diff --git a/src/package.json b/src/package.json index 7125393..54d9d6f 100644 --- a/src/package.json +++ b/src/package.json @@ -15,7 +15,7 @@ } ], "dependencies": { - "@browserpass/url": "^1.1.3", + "@browserpass/url": "^1.1.6", "chrome-extension-async": "^3.3.2", "fuzzysort": "^1.1.4", "idb": "^4.0.3", diff --git a/src/popup/searchinterface.js b/src/popup/searchinterface.js index 172bb2c..bc49022 100644 --- a/src/popup/searchinterface.js +++ b/src/popup/searchinterface.js @@ -1,5 +1,6 @@ module.exports = SearchInterface; +const BrowserpassURL = require("@browserpass/url"); const m = require("mithril"); /** @@ -29,7 +30,7 @@ function SearchInterface(popup) { */ function view(ctl, params) { var self = this; - var host = new URL(this.popup.settings.origin).host; + var host = new BrowserpassURL(this.popup.settings.origin).host; return m( "form.part.search", { diff --git a/src/yarn.lock b/src/yarn.lock index c703992..2bba38f 100644 --- a/src/yarn.lock +++ b/src/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@browserpass/url@^1.1.3": +"@browserpass/url@^1.1.6": version "1.1.6" resolved "https://registry.yarnpkg.com/@browserpass/url/-/url-1.1.6.tgz#53831fe9228ecfba2fec5d0166f3fcbd266e2615" integrity sha512-mWgr6kco+PFn0+e1cYEmNj0r352eFau5aJRhTR8uHT2D5PYa2KH7dGqkg+uhwkR042etOrPczvaO+5Mp80b0GQ==