Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

clipper: always clip tab from current active window

Abdullah Atta1d5ac372223e
diff --git a/extensions/web-clipper/src/views/main.tsx b/extensions/web-clipper/src/views/main.tsx
index bc980116f..560872b1e 100644
--- a/extensions/web-clipper/src/views/main.tsx
+++ b/extensions/web-clipper/src/views/main.tsx
@@ -112,7 +112,11 @@ export function Main() {
useEffect(() => {
(async () => {
- const [tab] = await browser.tabs.query({ active: true });
+ const [tab] = await browser.tabs.query({
+ active: true,
+ currentWindow: true,
+ windowType: "normal"
+ });
setTitle(tab?.title ? tab.title : "Untitled");
setUrl(tab?.url);
@@ -406,7 +410,11 @@ export async function clip(
return { data: clipData };
}
- const [tab] = await browser.tabs.query({ active: true });
+ const [tab] = await browser.tabs.query({
+ active: true,
+ currentWindow: true,
+ windowType: "normal"
+ });
if (!tab || !tab.id) return;
if (area === "visible" && mode === "screenshot") {