I working in user script right now.
The main behaviour atm is to open every .mapList by clicking on it and then gather the info.
After that add gathered values into titles.
If somebody done this before, please share, if nobody has it, I will share it once finish it.
Cheers.
Added one user feature which displays a menu of all topics in freeCodeCamp, onClick it moves you to the corresponded topic.
I’m working on adding progress into this #user_nav div so we can understand where we are and what we have completed without spending too much time.
Awesome idea! There was a similar request for this feature, I think on GitHub, but I cannot find it anymore. You should open an issue there or try to find the one that already exists (if it exists). You already have the code ready, you can propose to implement this feature yourself, if you want to, or leave it for someone else to do if you dont have the time.
There is another issue that opens the basic html part of the responsive section every time you open https://learn.freecodecamp.org/ . I didnt check if your script solves this issue? If it does you can check for that issue too, there should be one for that on GitHub.
Thank you for your reply.
To be honest I didn’t check source of freeCodeCamp on github, but I will take time to read it with patience.
Once I finish user_navigation user script I will open a request on github (but if you want to do it by yourself, feel free, it’s open source anyway )
“There is another issue that opens the basic html part of the responsive section every time you open https://learn.freecodecamp.org/”
I didn’t get this type of issue, or maybe I don’t do the same steps as you do, could you share your step by step please?
It is exactly what is doing right now, it shows you the info completed lessons/tasks on the top-right corner of your tab, like here:
If you have different output or it is everything on zero but you have completed items, please share your console output, thanks.
I will add some try catch in a future to solve some kind of errors.
“There is another issue that opens the basic html part of the responsive section every time you open https://learn.freecodecamp.org/”
I didn’t get this type of issue, or maybe I don’t do the same steps as you do, could you share your step by step please?
Maybe you have to disable your script first to see how it behaves. When you reload https://learn.freecodecamp.org/ it always expands “Basic HTML and HTML5”. Same happens when you go back from a later challenge to the main page via the “Curriculum” button in the top left:
I was wondering if this behaviour changed for you when you run your script?
I debugged the code and found out,
that the IIFE runs before the classList has its second class for passing the if condition.
therefore the counter condition is always false.
Setting up a Listener for DOMContentLoaded didn’t work,
so I fixed it by changing the IIFE into an anonymous handler of the setTimeout function.
setTimeout((function(){
...
}), 10000);
Now it outputting the correct values.
Thanks for your work,
I think I got you confused… when I said you could post it on GitHub I meant the issue tracker for freeCodeCamp:
But I dont know if its just for problems, or if we can propose additions to the website there as well. Anyway I dont want to steal your fame so I leave it up to you to post it there.
@maurodibert hi/hola.
It could be done with localstorage object but, to be honest, I am okay with what is doing right now.
if anyone wants to add self tailored function are very welcome, the code is open-source and free to use, reuse, recopyright and do what ever you like to do.
If you want to create a function for your own you might use a google-fu for:
offsetTop
window.scrollTo