1f6128 Refactor the JS to move most of the logic into its own file

Authored and Committed by Pierre-Yves Chibon 9 years ago
    Refactor the JS to move most of the logic into its own file
    
    This also splits the logic over multiple functions to make the code
    easier to read
    
        
file modified
+15 -155