Fix about:XXX support in Firefox (#198)
This commit is contained in:
@@ -139,7 +139,7 @@ async function updateMatchingPasswordsCount(tabId, forceRefresh = false) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const tab = await chrome.tabs.get(tabId);
|
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) {
|
} catch (e) {
|
||||||
throw new Error(`Unable to determine domain of the tab with id ${tabId}`);
|
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
|
// build fill request
|
||||||
var fillRequest = {
|
var fillRequest = {
|
||||||
origin: new URL(settings.tab.url).origin,
|
origin: new BrowserpassURL(settings.tab.url).origin,
|
||||||
login: login,
|
login: login,
|
||||||
fields: fields
|
fields: fields
|
||||||
};
|
};
|
||||||
@@ -482,7 +482,7 @@ async function fillFields(settings, login, fields) {
|
|||||||
|
|
||||||
// build focus or submit request
|
// build focus or submit request
|
||||||
let focusOrSubmitRequest = {
|
let focusOrSubmitRequest = {
|
||||||
origin: new URL(settings.tab.url).origin,
|
origin: new BrowserpassURL(settings.tab.url).origin,
|
||||||
autoSubmit: getSetting("autoSubmit", login, settings),
|
autoSubmit: getSetting("autoSubmit", login, settings),
|
||||||
filledFields: filledFields
|
filledFields: filledFields
|
||||||
};
|
};
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@browserpass/url": "^1.1.3",
|
"@browserpass/url": "^1.1.6",
|
||||||
"chrome-extension-async": "^3.3.2",
|
"chrome-extension-async": "^3.3.2",
|
||||||
"fuzzysort": "^1.1.4",
|
"fuzzysort": "^1.1.4",
|
||||||
"idb": "^4.0.3",
|
"idb": "^4.0.3",
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
module.exports = SearchInterface;
|
module.exports = SearchInterface;
|
||||||
|
|
||||||
|
const BrowserpassURL = require("@browserpass/url");
|
||||||
const m = require("mithril");
|
const m = require("mithril");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,7 +30,7 @@ function SearchInterface(popup) {
|
|||||||
*/
|
*/
|
||||||
function view(ctl, params) {
|
function view(ctl, params) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var host = new URL(this.popup.settings.origin).host;
|
var host = new BrowserpassURL(this.popup.settings.origin).host;
|
||||||
return m(
|
return m(
|
||||||
"form.part.search",
|
"form.part.search",
|
||||||
{
|
{
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@browserpass/url@^1.1.3":
|
"@browserpass/url@^1.1.6":
|
||||||
version "1.1.6"
|
version "1.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/@browserpass/url/-/url-1.1.6.tgz#53831fe9228ecfba2fec5d0166f3fcbd266e2615"
|
resolved "https://registry.yarnpkg.com/@browserpass/url/-/url-1.1.6.tgz#53831fe9228ecfba2fec5d0166f3fcbd266e2615"
|
||||||
integrity sha512-mWgr6kco+PFn0+e1cYEmNj0r352eFau5aJRhTR8uHT2D5PYa2KH7dGqkg+uhwkR042etOrPczvaO+5Mp80b0GQ==
|
integrity sha512-mWgr6kco+PFn0+e1cYEmNj0r352eFau5aJRhTR8uHT2D5PYa2KH7dGqkg+uhwkR042etOrPczvaO+5Mp80b0GQ==
|
||||||
|
Reference in New Issue
Block a user