From 98e3a4aeacb55a11cc1bbaccddb96679d3df50c7 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 30 Dec 2021 22:31:19 +1000 Subject: [PATCH] Appease eslint --- js/background.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/background.js b/js/background.js index 5b68589..26b29e9 100644 --- a/js/background.js +++ b/js/background.js @@ -26,9 +26,9 @@ chrome.storage.sync.get('defaultOptions', function () { // Setup "Search by image" context menu item chrome.contextMenus.create( { - "id": "ViewImage-SearchByImage", - "title": toI18n("__MSG_searchImage__"), - "contexts": ["image"], + 'id': 'ViewImage-SearchByImage', + 'title': toI18n('__MSG_searchImage__'), + 'contexts': ['image'], } ); @@ -36,19 +36,19 @@ chrome.contextMenus.onClicked.addListener( (info, tab) => { if (DEBUG) - console.log("ViewImage: Search By Image context menu item clicked.", info, tab); + console.log('ViewImage: Search By Image context menu item clicked.', info, tab); - if (info.menuItemId === "ViewImage-SearchByImage") { + if (info.menuItemId === 'ViewImage-SearchByImage') { chrome.permissions.request({ - permissions: ["tabs"], + permissions: ['tabs'], origins: [tab.url], }, (granted) => { if (granted) { chrome.tabs.executeScript(tab.id, { - code: `window.location.href = "http://www.google.com/searchbyimage?image_url=${encodeURIComponent(info.srcUrl)}"` - }) + code: `window.location.href = 'http://www.google.com/searchbyimage?image_url=${encodeURIComponent(info.srcUrl)}'` + }); } }); } } -); \ No newline at end of file +);