FreederTeam / Freeder

An easy-to-use free feed reader
Other
5 stars 1 forks source link

cleaning script.js #72

Closed tmos closed 9 years ago

tmos commented 9 years ago

Hi :)

As we only keep one JS file, I think it could be nice to try keeping it clean. For example I think it would be nice to keep the first $(document).ready clean, with just init functions, and place those init functions code with other code parts that concern it.

Because code added from line 8 to 35 isn't commented at all, and It will quickly git wild I think (greeder JS was pretty unreadable so we had to refactor once of twice).

Phyks commented 9 years ago

:+1:

Phyks commented 9 years ago

Will do it while handling https://github.com/FreederTeam/Freeder/issues/52.

eliemichel commented 9 years ago

Ok, but I noticed that some init functions are not called in this function but in the root code. $("foo") accesses should be called only when DOM is ready, so from this init function.

(PS: I think some of the not commented code in init is from me… my bad)

Phyks commented 9 years ago

Done in last commit. It may be worth to refactor a bit though.