Skip to content

Instantly share code, notes, and snippets.

@Bowenislandsong
Last active January 5, 2022 22:23
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 Bowenislandsong/7172915522d7a18b08ffd139b531c639 to your computer and use it in GitHub Desktop.
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).
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