Bookmarklets to help make navigation of schoology easier.
Last active
November 22, 2016 17:59
-
-
Save nathanhleung/ed47ec099a10c311f5d92f1b8d694db1 to your computer and use it in GitHub Desktop.
schoology-bookmarklets
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
$('.nathan-appended').remove(); // remove previously appended stuff | |
// find each course | |
$('.gradebook-course').each((i, el) => { | |
// for each course, find the MP grades | |
const mpGrades = $(el).find('.period-row .awarded-grade .rounded-grade'); | |
const latestMp = mpGrades[mpGrades.length - 1]; | |
const grade = $(latestMp).html(); | |
// get overall grade | |
const overallGrade = $(el).find('.summary-course .awarded-grade .rounded-grade').html(); | |
// put the grade next to the course title | |
$(el).find('.gradebook-course-title').append( | |
// give nathan-appended class so then we can remove the stuff later | |
// grade || 'N/A' -> if grade is undefined, then 'N/A' will print | |
`<div | |
class='nathan-appended' | |
style=' | |
position: relative; | |
top: -10px; | |
right: 20px; | |
text-align: right; | |
color: #3aa406; | |
font-size: 13px; | |
font-weight: bold; | |
float: right; | |
' | |
> | |
MP: ${grade || 'N/A'} | |
<br> | |
Average: ${overallGrade || 'N/A'} | |
</div>` | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment