Skip to content

Instantly share code, notes, and snippets.

View Icohen007's full-sized avatar
🏠
Working from home

Itamar Cohen Icohen007

🏠
Working from home
View GitHub Profile
import { useRef, useEffect, useState } from 'react';
function debounce(func, wait) {
let timeout;
return function fn(...args) {
const context = this;
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(context, args), wait);
};
}
@Icohen007
Icohen007 / hilanetAutoFill.js
Last active April 10, 2022 10:36
hilanet auto fill
function triggerTouch(element, eventType) {
const event = document.createEvent('Event');
event.initEvent(eventType, false, true);
element[eventType]();
element.dispatchEvent(event);
}
function selectMissingDays() {
const missingDaysSelector = '.imageContainerStyle img';
const missingDaysButton = "input[type='submit'][id*='RefreshSelectedDays']";