Skip to content

Commit

Permalink
integrate tdx-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mart2070 committed Jul 17, 2024
1 parent 99b70a1 commit 7fcb5f5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tdx-enhanced.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// ==UserScript==
// @name tdx-enhanced
// @namespace ecn
// @version 2024-05-14-03
// @version 2024-07-17-01
// @description enhanced tdx coloring & formatting. follows system color scheme.
// @author Purdue STEM IT - it@purdue.edu
// @match https://service.purdue.edu/TDNext/*
// @match https://service.purdue.edu/TDWebApi/*
// @require https://momentjs.com/downloads/moment.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.6.0/tinycolor.min.js
// @downloadURL https://raw.github.itap.purdue.edu/ECN/tdx-userscript/main/tdx-enhanced.js
Expand Down Expand Up @@ -556,9 +557,23 @@
}
}

function checkPath() {
let path = document.location.pathname
if (path=="/TDWebApi/api/auth/loginsso") {
let pre = document.querySelector("pre")
if (pre) {
console.log("Got key!",pre.innerText)
let key = pre.innerText
window.opener.postMessage({tdxkey:key},"https://engineering.purdue.edu")
window.close()
}
}
}

changeTitle()
checkColorMode()
parseTicket()
checkPath()

const customStyles = `
Expand Down

0 comments on commit 7fcb5f5

Please sign in to comment.