Search code examples
javascriptjqueryjquery-uigraphdecompiling

How should I reverse engineer this simple javascript animation?


I came across this Slate article that presents data in a new and interesting way. How can I reverse engineer the website so I can learn, and potentially imitate the technique on my own.

To keep this constructive for future websites, please describe the general steps and what tools I would need to efficiently break the code down into manageable chunks.


Solution

  • I don't know that you need many tools other than a web browser and view source. You probably will want to extract some of it into your own html/javascript files to test to make sure you have all the relevant code - not sure what else you might need. I think it's a lot of trial and error.

    In this particular case, viewing the source would give you your answer pretty easily - it's not obfuscated at all. View source and look for

    <!--**********************PASTE THIS INTO RENDER HTML************* -->
    

    Right under that they include the javascript file relevant to the races and they have the html structure that their javascript uses.