-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
78 additions
and
1 deletion.
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 = 'lykdat'; | ||
|
||
async function search({session, search, image, storageIds}) { | ||
const inputSelector = '.top-search-image-box input[type=file]'; | ||
const input = await findNode(inputSelector); | ||
|
||
await setFileInputData(inputSelector, input, image); | ||
|
||
await sendReceipt(storageIds); | ||
|
||
input.dispatchEvent(new Event('change', {bubbles: true})); | ||
|
||
(await findNode('.finisher button')).click(); | ||
} | ||
|
||
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,25 @@ | ||
import browser from 'webextension-polyfill'; | ||
|
||
const message = 'Add LykDat'; | ||
|
||
const revision = '20211111071410_add_lykdat'; | ||
const downRevision = '20211106103932_add_shein'; | ||
|
||
const storage = browser.storage.local; | ||
|
||
async function upgrade() { | ||
const changes = {}; | ||
const {engines, disabledEngines} = await storage.get([ | ||
'engines', | ||
'disabledEngines' | ||
]); | ||
const newEngines = ['lykdat']; | ||
|
||
changes.engines = engines.concat(newEngines); | ||
changes.disabledEngines = disabledEngines.concat(newEngines); | ||
|
||
changes.storageVersion = revision; | ||
return storage.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