Last active
January 5, 2022 22:23
-
-
Save Bowenislandsong/7172915522d7a18b08ffd139b531c639 to your computer and use it in GitHub Desktop.
Add the following to book mark for easy trojancheck clicking. Trojancheck always change the question layout, this code needs to be updated accordingly. To use it, create a book mark with this js script. Navigate to trojancheck page and click this bookmark till the last page (~4 clicks).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (() => { | |
if (location.href=="https://trojancheck.usc.edu/login"){ | |
document.querySelector('[aria-label="Log in with your USC NetID"]').click(); | |
} | |
else if (location.href=="https://trojancheck.usc.edu/consent"){ | |
document.querySelector('.submit-button').click(); | |
} | |
else if (location.href=="https://trojancheck.usc.edu/dashboard"){ | |
document.querySelector('.btn-begin-assessment').click(); | |
} | |
else { | |
document.querySelector('.btn-next').click(); | |
for (let n = 0; n<4;n++){ | |
var btns = document.querySelectorAll('.mat-button-toggle-button'); | |
for (let i = 0; i < btns.length; i++) { | |
btns[i].click(); | |
} | |
document.querySelector('.btn-next').click(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment