Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Open new tab for clip.html in background #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ chrome.runtime.onMessage.addListener(async function listener(result) {

// Open a new tab for clipping through the protocol, since we cannot go from the extension to this..
if (result.testing) {
chrome.tabs.create({ url: redirectUrl , active: true},function(obsidianTab){
chrome.tabs.create({ url: redirectUrl , active: false},function(obsidianTab){
// Since we're testing, we are not closing the tag...
});
} else {
chrome.tabs.create({ url: redirectUrl , active: true},function(obsidianTab){
chrome.tabs.create({ url: redirectUrl , active: false},function(obsidianTab){
setTimeout(function() { chrome.tabs.remove(obsidianTab.id) }, 500);
});
}
Expand Down