Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Change index.html to popup.html paths (#581)

Leendert de Borstfab12daacf05
diff --git a/browser-extension/src/entrypoints/content.ts b/browser-extension/src/entrypoints/content.ts
index fbcb70881..230b08dcb 100644
--- a/browser-extension/src/entrypoints/content.ts
+++ b/browser-extension/src/entrypoints/content.ts
@@ -1,11 +1,15 @@
import { FormDetector } from '../utils/formDetector/FormDetector';
import { isAutoShowPopupDisabled, openAutofillPopup, removeExistingPopup } from './contentScript/Popup';
import { canShowPopup, injectIcon } from './contentScript/Form';
-import { sendMessage, onMessage } from "webext-bridge/content-script";
+import { onMessage } from "webext-bridge/content-script";
export default defineContentScript({
matches: ['<all_urls>'],
main(ctx) {
+ if (ctx.isInvalid) {
+ return;
+ }
+
// Listen for input field focus
document.addEventListener('focusin', async (e) => {
if (ctx.isInvalid) {
diff --git a/browser-extension/src/entrypoints/popup/pages/CredentialDetails.tsx b/browser-extension/src/entrypoints/popup/pages/CredentialDetails.tsx
index b613a70ad..e87a4559f 100644
--- a/browser-extension/src/entrypoints/popup/pages/CredentialDetails.tsx
+++ b/browser-extension/src/entrypoints/popup/pages/CredentialDetails.tsx
@@ -35,7 +35,7 @@ const CredentialDetails: React.FC = () => {
const top = window.screen.height / 2 - height / 2;
window.open(
- `index.html?popup=true#/credentials/${id}`,
+ `popup.html?popup=true#/credentials/${id}`,
'CredentialDetails',
`width=${width},height=${height},left=${left},top=${top},popup=true`
);
@@ -72,8 +72,8 @@ const CredentialDetails: React.FC = () => {
// For popup windows, ensure we have proper history state for navigation
if (isPopup()) {
// Clear existing history and create fresh entries
- window.history.replaceState({}, '', `index.html#/credentials`);
- window.history.pushState({}, '', `index.html#/credentials/${id}`);
+ window.history.replaceState({}, '', `popup.html#/credentials`);
+ window.history.pushState({}, '', `popup.html#/credentials/${id}`);
}
if (!dbContext?.sqliteClient || !id) {
diff --git a/browser-extension/src/entrypoints/popup/pages/EmailDetails.tsx b/browser-extension/src/entrypoints/popup/pages/EmailDetails.tsx
index 27facdc9b..308b1c8bc 100644
--- a/browser-extension/src/entrypoints/popup/pages/EmailDetails.tsx
+++ b/browser-extension/src/entrypoints/popup/pages/EmailDetails.tsx
@@ -36,8 +36,8 @@ const EmailDetails: React.FC = () => {
// For popup windows, ensure we have proper history state for navigation
if (isPopup()) {
// Clear existing history and create fresh entries
- window.history.replaceState({}, '', `index.html#/emails`);
- window.history.pushState({}, '', `index.html#/emails/${id}`);
+ window.history.replaceState({}, '', `popup.html#/emails`);
+ window.history.pushState({}, '', `popup.html#/emails/${id}`);
}
/**
@@ -98,7 +98,7 @@ const EmailDetails: React.FC = () => {
const top = window.screen.height / 2 - height / 2;
window.open(
- `index.html?popup=true#/emails/${id}`,
+ `popup.html?popup=true#/emails/${id}`,
'EmailDetails',
`width=${width},height=${height},left=${left},top=${top},popup=true`
);