I am working on cleaning up pages that were built wth Twitter Bootstrap. Every page has the complete set of Booststrap Javascript codes that COULD be used. But to speed up the page I want to delete all the JS that is not used. (see example below)

From trial and error on one page, I found that only two of the JavaScript codes were actually used.

Is there an easy program or some automatic way to determine which JavaScript pieces are used? (I really don't want to do trial and error removal on all the pages )

<!-- Java Script placed at the end of the document so the pages load faster -->    
    <!-- Le javascript -->
    <script src="../assets/js/jquery.js"></script>
    <script src="../assets/js/bootstrap-transition.js"></script>
    <script src="../assets/js/bootstrap-alert.js"></script>
    <script src="../assets/js/bootstrap-modal.js"></script>
    <script src="../assets/js/bootstrap-dropdown.js"></script>
    <script src="../assets/js/bootstrap-scrollspy.js"></script>
    <script src="../assets/js/bootstrap-tab.js"></script>
    <script src="../assets/js/bootstrap-tooltip.js"></script>
    <script src="../assets/js/bootstrap-popover.js"></script>
    <script src="../assets/js/bootstrap-button.js"></script>
    <script src="../assets/js/bootstrap-collapse.js"></script>
    <script src="../assets/js/bootstrap-carousel.js"></script>
    <script src="../assets/js/bootstrap-typeahead.js"></script>