-
-
Save anonymous/7accf04ac6bd300055ec to your computer and use it in GitHub Desktop.
Press Numpad 0 to show your language streaks
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 Display language streaks | |
// @namespace http://xaasd.werd.asd | |
// @version 0.2 | |
// @description: Press Numpad 0 to display language streaks. Wrapper for code from pinkodoug | |
// @include http://www.duolingo.com/* | |
// @include https://www.duolingo.com/* | |
// @copyright 2014+ | |
// ==/UserScript== | |
document.addEventListener('keyup', function(event) { | |
if(event.keyCode === 96){ // Numpad 0 | |
var expAlert="Site Streak: "+duo.user.attributes.site_streak+"\n"; | |
for(var i in duo.user.attributes.languages){ | |
if (duo.user.attributes.languages[i].learning){ | |
expAlert=expAlert+duo.user.attributes.languages[i].language_string+" Streak: "+duo.user.attributes.languages[i].streak; | |
expAlert=expAlert+" Lvl: "+duo.user.attributes.languages[i].level+" XP:"+duo.user.attributes.languages[i].points+" lvlup: "; | |
expAlert=expAlert+duo.user.attributes.languages[i].to_next_level+"\n"; | |
} | |
} | |
window.alert(expAlert); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment