Last active
May 3, 2024 10:33
-
-
Save zuramai/e700c76a6b94e36ebdba4207c79103fc to your computer and use it in GitHub Desktop.
Auto Input CIS
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
const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
let i = 0 | |
// PLEASE REMOVE THE JUDGEMENT SCORE, ONLY INCLUDE THE MEASUREMENT | |
let data = prompt().split('\n').filter(v => v != "") | |
const inputData = async () => { | |
let rightButton = document.querySelectorAll(".btn.btn-sm.btn-wsi-light")[5] | |
if (rightButton.classList.contains('disabled')) return false | |
let inputs = document.querySelectorAll('.mark-entry-direct') | |
console.log("inputting ", inputs.length, "data") | |
for(let j = 0; j < inputs.length; j++){ | |
await sleep(200) | |
let input = inputs[j] | |
input.value = data[i] | |
input.dispatchEvent(new Event('change')); | |
i++ | |
if(i >= data.length) return false | |
} | |
rightButton.click() | |
return true | |
} | |
const run = async () => { | |
while(true){ | |
await sleep(1000) | |
let loop = await inputData(); | |
if(!loop) break | |
} | |
} | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment