Skip to content

Instantly share code, notes, and snippets.

@cycomachead
Last active February 25, 2018 16:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cycomachead/fbecc318458bad7a1762218eba15e9a9 to your computer and use it in GitHub Desktop.
Save cycomachead/fbecc318458bad7a1762218eba15e9a9 to your computer and use it in GitHub Desktop.
Bookmarklets and scripts for tweaking gradescope.com

Gradescope Hacks

This is a collection of bookmarklets and scripts that you can use to adapt Gradescope to do (currently) unsupported things. Unless otherwise noted, make a new bookmark, then set it's link/URL to the code for each hack.

Directions

To make a new bookmarklet, create a new bookmark in your browser, then use the edit functionality to set the URL. Make sure to include the full text starting with "javascript:". When you click that bookmark while on the page it will prompt you and then do its thing. :) (Nothing should happen on any page that isn't the right one.)

Warning: These are subject to break at any time. :-)

Review Grades Page

  • Adjust Histogram Size
    • This allows you to set a custom bin size for the historgram. It will pop open a dialog asking for the number of bins you want.
    • javascript:(function(){if(!gon%20&&%20!gon.num_bins){alert('Cannot%20find%20the%20chart%20on%20this%20page.');}var%20bin_size=prompt('Please%20enter%20the%20number%20of%20bins',%20'10');gon.num_bins=parseInt(bin_size);$('.reviewGrades--chart svg').remove();old_alert=alert;alert=function(){return};try{site.assignments.renderReviewGradesChart()}catch(Error){}}())
    • Adjust Gradescope Bin Size (Drag this, then edit the URL).
@ibrahima
Copy link

Updated snippet:

javascript:(function(){if(!gon%20&&%20!gon.num_bins){alert('Cannot%20find%20the%20chart%20on%20this%20page.');}var%20bin_size=prompt('Please%20enter%20the%20number%20of%20bins',%20'10');gon.num_bins=parseInt(bin_size);$('.reviewGrades--chart svg').remove();old_alert=alert;alert=function(){return};try{site.assignments.renderReviewGradesChart()}catch(Error){}}())

@cycomachead, can you update the gist? Thanks!

@cycomachead
Copy link
Author

Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment