Last active
April 7, 2023 02:23
-
-
Save FernandoBontorin/e7e0352540399a5f9e7a8d034b3e997a to your computer and use it in GitHub Desktop.
snipa o pessoal e pa
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
function snip(dateISOformat, diff=0){ | |
var target = new Date(dateISOformat).getTime(); | |
var duration = document.getElementById("date_arrival").firstElementChild.getAttribute("data-duration")*1000; | |
var send = target-duration; | |
var timeout = send-new Date().getTime()-18000; | |
setTimeout(()=>{document.getElementById("troop_confirm_submit").click()}, timeout+diff); | |
console.log(new Date(timeout).toUTCString().slice(-11, -4)); | |
};snip("2023-04-08T09:26:30.100-03:00", -34219) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment