Skip to content

Instantly share code, notes, and snippets.

@plasticmind
Last active February 22, 2024 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plasticmind/e5a1ce6634e61bdbb97758ef8824950a to your computer and use it in GitHub Desktop.
Save plasticmind/e5a1ce6634e61bdbb97758ef8824950a to your computer and use it in GitHub Desktop.
LATS Timesheet Jumpstart
javascript:(function(){var e=["Monday","Tuesday","Wednesday","Thursday","Friday"],t=document.getElementById('timesheetTable'),n=t.getElementsByTagName('tr');if(!t)return;for(var r=0;r<n.length;r++){var a=n[r],o=a.querySelector('.k-header.timesheetGridHeader');if(o){var d=o.textContent.trim();if(['Day In','Lunch Out','Lunch In','Day Out'].includes(d)){var i=a.getElementsByTagName('input');for(var u=0;u<i.length;u++){var c=i[u];if('text'===c.type&&e.includes(c.title.split(' ').pop()))switch(d){case'Day In':c.value='8:30 AM';break;case'Lunch Out':c.value='11:30 AM';break;case'Lunch In':c.value='12:00 PM';break;case'Day Out':c.value='4:30 PM';}}}}}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment