Professional Documents
Culture Documents
AddIdle-TOT
AddIdle-TOT
AddIdle-TOT
// @name Add_Idle(testing)
// @version 0.1
// @require https://ekarulf.corp.amazon.com/js/jquery-1.12.4.min.js
// @include https://fclm-portal.amazon.com/reports/timeOnTask*
// @grant GM.xmlHttpRequest
// @grant GM.xmlhttpRequest
// @grant GM_xmlhttpRequest
// @grant GM.info
// @author adacrans - Adam Cranston
// ==/UserScript==
addButtons();
function addButtons(){
$('.tot-filters').append(button1Div);
$('.tot-filters').append(button2Div);
button1Div.appendChild(runButton);
button2Div.appendChild(unlockButton);
//
function runIdle(){
filteredManagers.forEach((filtered) =>{
filtered.className = "filtered";
filtered.hidden = true;
});
header.firstElementChild.appendChild(myHead);
myHead.textContent = "Idle Time";
var rows = document.querySelectorAll('.tot-row');
rows.forEach((row) => {
empIDArr = document.querySelectorAll("a.employee-time-details-link");
let z = document.createElement("td");
let zd = document.createElement("div");
GM.xmlHttpRequest({
method: 'GET',
url: targetLink,
onload: function(response){
var parser = new DOMParser();
//'.myContainer').prepend(idleSeg);
$('.myContainer' + String(row.rowIndex)).prepend(idleSeg);
var durationArr = document.querySelectorAll('.rightAlign');
function runUnlock(){
let reverseTargets = document.querySelectorAll('.filtered');
reverseTargets.forEach((target) =>{
target.className = "tr.tot-row.hide-manager";
target.hidden = false;
});
}