Skip to content

Commit

Permalink
fix settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kabuspl committed Jun 1, 2024
1 parent 96fffe5 commit d63b0c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function decodeHTMLEntities(text) {
async function search(image) {
const settings = await browser.storage.sync.get();
browser.tabs.query({active: true}).then(active=>{
browser.tabs.create({url: "loading.html", index: active[0].index+1, active: !settings.openInBG}).then(async tab=>{
browser.tabs.create({url: "loading.html", index: active[0].index+1, active: !(settings.openInBG || false)}).then(async tab=>{
let data = new FormData();
data.append('encoded_image', image, "screenshot.png");
let req = await fetch("https://lens.google.com/upload?ep=ccm&s=&st=" + Date.now(), {
Expand All @@ -116,7 +116,7 @@ async function search(image) {
const url = req.url;
const t_url = new URL(url, "https://lens.google.com").href

if(settings.doNotLoad) {
if(settings.doNotLoad || false) {
urlsToOpen.push({
tab: tab.id,
url: t_url
Expand Down

0 comments on commit d63b0c2

Please sign in to comment.