Last active
April 2, 2019 01:07
-
-
Save darai0512/925591b7d7bac378fbad497d1ae5ed68 to your computer and use it in GitHub Desktop.
Auto-fill in TeamSpirit Attendance Sheet (if you'd like to stop this script, reload the page.)
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
javascript:(()=>{const targets = document.querySelectorAll('td.dval.vst.day_time0');const len = targets.length;if(len===0)return;let i = 0;const id = setInterval(()=>{if(document.querySelector('#dlgInpTimeOk')!==null)return;targets[i++].click();const st=document.querySelector('#startTime');if(st.value==='')st.value='12:00';const en=document.querySelector('#endTime');if(en.value==='')en.value='20:00';document.querySelector('#dlgInpTimeOk').click();if(i===len)clearInterval(id);}, 1000);})() |
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 targets = document.querySelectorAll('td.dval.vst.day_time0'); | |
const len = targets.length; | |
if (len === 0) return; | |
let i = 0; | |
const id = setInterval(() => { | |
if (document.querySelector('#dlgInpTimeOk') !== null) return; | |
targets[i++].click(); | |
const st = document.querySelector('#startTime'); | |
if (st.value === '') st.value = '12:00'; | |
const en = document.querySelector('#endTime'); | |
if (en.value === '') en.value = '20:00'; | |
document.querySelector('#dlgInpTimeOk').click(); | |
if (i === len) clearInterval(id); | |
}, 1000); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment