Sunday, 21 December 2008

Scripts Used in Golf Predictor

You must have JavaScript enabled on your browser for Golf Predictor to work properly. For those of you worried about web security and/or using script blockers, this is a list of what JavaScript is used for on the site:
  1. AJAX for partial page updating and a more responsive website.
  2. Trapping AJAX request time outs and reloading the page if they occur.
  3. The Twitter Bootstrap dropdown menus (across the top of every page), pop- up chart windows and collapsible panels.
  4. Highlighting the currently selected page in the appropriate menu.
  5. Displaying all the radial dials, charts and Google Maps on the site.
  6. Displaying the Golf Predictor Twitter feed widget. 
  7. Google Analytics, for tracking web site usage statistics.
  8. To protect email addresses on the Contact Us page from spammer harvesting.
  9. To prevent more than 10 golfers being selected on the 'Compare' pages.
  10. To prevent more than 3 golfers being selected on the 'Field Rankings (Summary)' page.
  11. A third party site runs a script on the "Golfer Odds" page to display the odds for the selected tournament. 
  12. To show the sliders on pages such as the 'Custom Predictions', 'Filtered Predictions' and 'DFS Lineup Builder (DraftKings)' pages and to provide validation for them and the associated text boxes.
  13. To create a DFS lineup and export it to a CSV on the 'DFS Lineup Builder (DraftKings)' page.
This is the complete list to the best of my recollection. I will update it if I add or remember more. As you can see, not much script is used on the site and a significant portion of the script is used is for third party functionality. Note that the site does not (and never will) run any malicious code in your browser. So, if you are using a script blocker, please allow Golf Predictor. You will get a message on screen if JavaScript is not enabled on your browser for any reason.

No comments: