Skip to content

Instantly share code, notes, and snippets.

@adamwight
Created January 28, 2021 15:59
Show Gist options
  • Select an option

  • Save adamwight/49880ba5c7057e5f28d20c2694b6e32d to your computer and use it in GitHub Desktop.

Select an option

Save adamwight/49880ba5c7057e5f28d20c2694b6e32d to your computer and use it in GitHub Desktop.
Userscript for WMDE TicTac
// h/t Tobias A.
$(".oe_attendance_sign_in_out").trigger('mouseenter');
x = new Date($(".tooltip").text().substring(14,33));
var diffMs = Date.now() - x.getTime();
var diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
console.log("Signed in: " + diffHrs + " Hours " + diffMins + "min")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment