From 5649061eacd9372fe208b37c9cab9d4c06a24dae Mon Sep 17 00:00:00 2001 From: "beard67@purdue.edu" Date: Wed, 11 Feb 2026 16:45:51 -0500 Subject: [PATCH 1/6] Get rid of more AI items --- tdx-enhanced.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index ba1991d..516ad0d 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -686,7 +686,6 @@ } } } - function parseOtherElements() { let path = document.location.pathname; @@ -715,11 +714,21 @@ }) document.querySelectorAll("#ToggleAIAgentAssist").forEach(AIAgentButton=>{ let selected = settings('get','aiBehavior'); - console.log("AI Behavior selected:",selected.value) if (selected == "aiDisable") { AIAgentButton.style.display = "none" } }) + document.querySelectorAll("#btnComment").forEach(AIAgentButton=>{ + let selected = settings('get','aiBehavior'); + if (selected == "aiDisable") { + AIAgentButton.addEventListener("click",function aiDestroy() { + console.log("called outside") + document.querySelectorAll(".cke_button__revisetext").forEach(AIAgentButton=>{ + AIAgentButton.style.display = "none" + }) + }) + } + }) let desktopLayout = settings('get','layout') let desktop = document.querySelector("#divContent") @@ -1227,6 +1236,14 @@ if (t.classList.contains("tdx-right-side-panel")) { parseOtherElements() } + if (t.classList.contains("js-suggestion-name")){ + document.querySelectorAll("#divFieldSuggestionsResponsible, #divFieldSuggestionsPriority").forEach(AIAgentButton=>{ + let selected = settings('get','aiBehavior'); + if (selected == "aiDisable") { + AIAgentButton.style.display = "none" + } + }) + } let module = t.querySelector("div > .tdx-dashboard__widget-container") if (module) { From 5178d7f554e24cdf109e54c6acc5db49d44ddc19 Mon Sep 17 00:00:00 2001 From: Elijah James Beard Date: Fri, 13 Feb 2026 11:16:02 -0500 Subject: [PATCH 2/6] code effeciency and more AI removal --- tdx-enhanced.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 516ad0d..e27f8b7 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -712,24 +712,13 @@ document.querySelectorAll("div.moreToggle *:not(a), div.lessToggle *:not(a), div.wrap-text *:not(a)").forEach(textBlock=>{ textBlock.style.color = "var(--txt-1)" }) - document.querySelectorAll("#ToggleAIAgentAssist").forEach(AIAgentButton=>{ + document.querySelectorAll("#ToggleAIAgentAssist, .tdx-view-ticket-summary").forEach(AIAgentButton=>{ let selected = settings('get','aiBehavior'); if (selected == "aiDisable") { AIAgentButton.style.display = "none" } }) - document.querySelectorAll("#btnComment").forEach(AIAgentButton=>{ - let selected = settings('get','aiBehavior'); - if (selected == "aiDisable") { - AIAgentButton.addEventListener("click",function aiDestroy() { - console.log("called outside") - document.querySelectorAll(".cke_button__revisetext").forEach(AIAgentButton=>{ - AIAgentButton.style.display = "none" - }) - }) - } - }) - + let desktopLayout = settings('get','layout') let desktop = document.querySelector("#divContent") if (desktop && desktopLayout) { @@ -1244,6 +1233,14 @@ } }) } + if (t.classList.contains("cke_button_label")){ + document.querySelectorAll(".cke_button__revisetext").forEach(AIAgentButton=>{ + let selected = settings('get','aiBehavior'); + if (selected == "aiDisable") { + AIAgentButton.style.display = "none" + } + }) + } let module = t.querySelector("div > .tdx-dashboard__widget-container") if (module) { From 32b7ee47dd197c859f1c5c753aff984d5c3e3b41 Mon Sep 17 00:00:00 2001 From: Elijah James Beard Date: Fri, 13 Feb 2026 11:48:39 -0500 Subject: [PATCH 3/6] missed an AI field --- tdx-enhanced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index e27f8b7..75d7d30 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -1226,7 +1226,7 @@ parseOtherElements() } if (t.classList.contains("js-suggestion-name")){ - document.querySelectorAll("#divFieldSuggestionsResponsible, #divFieldSuggestionsPriority").forEach(AIAgentButton=>{ + document.querySelectorAll("#divFieldSuggestionsResponsible, #divFieldSuggestionsPriority, #divFieldSuggestionsForm").forEach(AIAgentButton=>{ let selected = settings('get','aiBehavior'); if (selected == "aiDisable") { AIAgentButton.style.display = "none" From c52b8b143b39eb9e7fe73eb3ee1d61ad454433b2 Mon Sep 17 00:00:00 2001 From: Elijah James Beard Date: Tue, 17 Feb 2026 14:21:46 -0500 Subject: [PATCH 4/6] Bug Fix --- tdx-enhanced.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 75d7d30..4030985 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -1225,7 +1225,7 @@ if (t.classList.contains("tdx-right-side-panel")) { parseOtherElements() } - if (t.classList.contains("js-suggestion-name")){ + if (t.classList.contains("sr-alert-region")){ // magic class document.querySelectorAll("#divFieldSuggestionsResponsible, #divFieldSuggestionsPriority, #divFieldSuggestionsForm").forEach(AIAgentButton=>{ let selected = settings('get','aiBehavior'); if (selected == "aiDisable") { From d16731a21369b478ebc8422f5225281dc843463d Mon Sep 17 00:00:00 2001 From: Elijah James Beard Date: Tue, 24 Feb 2026 15:06:34 -0500 Subject: [PATCH 5/6] Age Hightlight --- tdx-enhanced.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index 4030985..c8954e6 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -913,6 +913,32 @@ } } + let age = ['Age'] + for (const dType of age) { + if (dType in item) { + let Age = item[dType] + const ageThreshold = 90 + + let days = Age.txt.slice(0,-1) + + let alpha = days / ageThreshold + alpha = alpha > 1 ? 1 : alpha + let cell = Age.cell + console.log(alpha) + handleHighlight("age",alpha,cell) + cell.classList.add(alpha > 0.5 ? "light" : "dark") + } + } + + // let Status = ['Status'] + // for (const dType of Status) { + // if (dType in item) { + // let CurrentStatus = item[dType] + // let cell = CurrentStatus.cell + // handleHighlight("status",CurrentStatus.txt,cell) + // } + // } + //find user replies & last modified by internal if ('Requestor' in item && 'Modified By' in item && 'Prim Resp' in item) { let fromUser = item["Requestor"] @@ -1139,6 +1165,14 @@ if (type=="dateModified") { element.style.backgroundColor = `rgba(255,0,0,${txt}`; } + // if (type=="status"){ + // if (txt=="In Process") { + // element.style.backgroundColor = "red" + // } + // } + if (type=="age") { + element.style.backgroundColor = `rgba(255,0,0,${txt}`; + } } } From 477ec04b191716f42c0d136891503e1c8b8f4103 Mon Sep 17 00:00:00 2001 From: Elijah James Beard Date: Fri, 27 Feb 2026 09:45:10 -0500 Subject: [PATCH 6/6] Josh's request for age highlight --- tdx-enhanced.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tdx-enhanced.js b/tdx-enhanced.js index c8954e6..338d666 100644 --- a/tdx-enhanced.js +++ b/tdx-enhanced.js @@ -917,16 +917,19 @@ for (const dType of age) { if (dType in item) { let Age = item[dType] - const ageThreshold = 90 + const ageThreshold = 30 let days = Age.txt.slice(0,-1) - let alpha = days / ageThreshold - alpha = alpha > 1 ? 1 : alpha - let cell = Age.cell - console.log(alpha) - handleHighlight("age",alpha,cell) - cell.classList.add(alpha > 0.5 ? "light" : "dark") + if (days > 30){ + days = days - 30 + let alpha = days / ageThreshold + alpha = alpha > 1 ? 1 : alpha + let cell = Age.cell + console.log(alpha) + handleHighlight("age",alpha,cell) + cell.classList.add(alpha > 0.5 ? "light" : "dark") + } } }