This chrome extension keeps a track of the problems solved by you on geeksforgeeks.org, and crosses them out.Hence, easing it out for you to concentrate on missed ones
Tested - all olds things working
To make things work made several changes on the way.
Problem 1: Since the funcs.js is injected, listeners could not be added till the script has loaded and functions, for ex initiate() is loaded. Also since the funcs.js is now loaded into page, the variables and functions doesn't comes to content scripts scope.
Solutions:
created a class scriptInjection to load scripts into main HTML, just to ease in the process
Now since the functions are not in scope all event listeners need to be attached from the main scope of gfg, so created another script meant for loading listeners - listeners.js
problem 2: the initiate is not loaded into memory even at the point the listeners is attached, {probably due to async nature} so attached it under a wrapper - listeners.js line#16, so this would still point to window object.
Solution: passed the reference object to initate and changed its definition to act accordingly
Tested - all olds things working To make things work made several changes on the way.
Problem 1: Since the
funcs.js
is injected, listeners could not be added till the script has loaded and functions, for exinitiate()
is loaded. Also since the funcs.js is now loaded into page, thevariables
andfunctions
doesn't comes to content scripts scope.Solutions:
scriptInjection
to load scripts into main HTML,just to ease in the process
listeners.js
problem 2: the initiate is not loaded into memory even at the point the listeners is attached, {
probably due to async nature
} so attached it under a wrapper -listeners.js line#16
, sothis
would still point towindow
object.Solution: passed the reference object to
initate
and changed its definition to act accordingly