Tip: Use alt to run code


#1

Hello,
I don’t like it that you always have to drag your mouse to ‘run’ to run your code. So I made a simple fix. (I did this in google chrome)
If you inspect on the codecademy site (while in an exercise, ctrl+shift+i in google) you can see a console tab.
Go to there and paste in the console te following code:

window.addEventListener("keydown", function(event){
if (event.altKey) {
var a =document.getElementsByClassName("basicBtn__SXDoTLXQzXLUYFBN37_VI");
a[0].click();
}});

If you press alt now (wile your typing) it will run your code!
I find this a very use full feature and maybe you to.
PS: You can change the code to another key if want.
PSS: I am dutch so sorry if I have bad grammar.


#2

Why go through so much trouble? You can use ctrl + enter by default to run your code

there is also keyboard support for next and previous exercise using keyboard:

https://help.codecademy.com/hc/en-us/articles/220800787-Can-I-navigate-Codecademy-courses-with-keyboard-shortcuts-


#3

Ow that’s true! I tried it but didn’t noticed it because it doesn’t do the loading animation then. That might have be easier :sweat_smile:


#4

ctrl + enter should do the loading animation. I tested it, worked fine


#5

This is what I get…