-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {findNode} from 'utils/common'; | ||
import {setFileInputData, initSearch, sendReceipt} from 'utils/engines'; | ||
|
||
const engine = 'icons8'; | ||
|
||
async function search({session, search, image, storageIds}) { | ||
(await findNode('button.search-autocomplete__img-trigger')).click(); | ||
|
||
const inputSelector = 'input#file-input'; | ||
const input = await findNode(inputSelector); | ||
|
||
await setFileInputData(inputSelector, input, image); | ||
|
||
await sendReceipt(storageIds); | ||
|
||
input.dispatchEvent(new Event('input')); | ||
} | ||
|
||
function init() { | ||
initSearch(search, engine, taskId); | ||
} | ||
|
||
init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const message = 'Add Icons8'; | ||
|
||
const revision = '20231102164602_add_icons8'; | ||
|
||
async function upgrade() { | ||
const changes = {}; | ||
const {engines, disabledEngines} = await browser.storage.local.get([ | ||
'engines', | ||
'disabledEngines' | ||
]); | ||
const newEngines = ['icons8']; | ||
|
||
changes.engines = engines.concat(newEngines); | ||
changes.disabledEngines = disabledEngines.concat(newEngines); | ||
|
||
changes.storageVersion = revision; | ||
return browser.storage.local.set(changes); | ||
} | ||
|
||
export {message, revision, upgrade}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters