Created
January 26, 2017 16:46
-
-
Save thosakwe/9965ff7409bc4de6712a85340f08ab49 to your computer and use it in GitHub Desktop.
Tampermonkey script to turn all your grades to A's.
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
// ==UserScript== | |
// @name New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Turns your grades on Jupiter Ed to A's. | |
// @author Tobe O | |
// @match https://*.jupitered.com/* | |
// @require https://code.jquery.com/jquery-3.1.1.slim.min.js | |
// @require https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.0/mousetrap.min.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function loadScript(src) { | |
var s = document.createElement('script'); | |
s.src = src; | |
document.body.appendChild(s); | |
} | |
function changeGrades() { | |
$('#showpage > tbody > tr > td > div.colwidth.lineheight > table > tbody > tr > td:nth-child(3) > span').each(function() { | |
var $span = $(this); | |
var text = $span.text(); | |
if (text.indexOf('A') === -1) { | |
var grade = (90 + Math.random() * 10).toFixed(1); | |
text = '' + grade + ' A'; | |
if (grade < 93) | |
text += '-'; | |
else if (grade >= 100) | |
text += '+'; | |
$span.html(text); | |
} | |
}); | |
} | |
if (!window.jQuery) | |
loadScript('https://code.jquery.com/jquery-3.1.1.slim.min.js'); | |
if (!window.Mousetrap) | |
loadScript('https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.0/mousetrap.min.js'); | |
$(document).ready(changeGrades); | |
Mousetrap.bind(['ctrl+shift+y', 'command+shift+y'], changeGrades); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey, i hava a problem, i just don´t need change grades, but also a lot of other info, could you help me? i am running out off time.thanks.