Skip to content

Commit

Permalink
fix: update Freepik
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed Dec 11, 2024
1 parent 850b3e3 commit 32866a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engines/freepik.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import {setFileInputData, initSearch, sendReceipt} from 'utils/engines';
const engine = 'freepik';

async function search({session, search, image, storageIds}) {
(await findNode('div[data-modal="search-by-image"]')).click();
(await findNode('form > div > button[data-state="closed"]')).click();

const inputSelector = 'input#form-search-by-image--file';
const inputSelector = 'input[type=file]';
const input = await findNode(inputSelector);

await setFileInputData(inputSelector, input, image);

await sendReceipt(storageIds);

input.dispatchEvent(new Event('change'));
input.dispatchEvent(new Event('change', {bubbles: true}));
}

function init() {
Expand Down

0 comments on commit 32866a2

Please sign in to comment.