pep8analysis: improve initial loading speed
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 16 Jun 2014 17:48:52 +0000 (13:48 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 17 Jun 2014 18:53:21 +0000 (14:53 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/pep8analysis/www/index.html

index 1e95bf0..cbbbb2c 100644 (file)
@@ -7,13 +7,6 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 
-       <script type="text/javascript" src="viz.js"></script>
-       <script>
-               // Both Viz and Pep8 use emscripten
-               // We put aside the module of each program and bring it back before each use
-               var VizModule = null
-       </script>
-
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
        <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
        <script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/4.2.0/mode/z80/z80.js"></script>
 
        <script>
+         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+         m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+         })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+         ga('create', 'UA-574578-5', 'xymus.net');
+         ga('send', 'pageview');
+       </script>
+
+       <script>
                // Redirect print to HTML
                var Module = {
                        'print': function(text) {
                        'noInitialRun': true,
                }
 
+               // Both Viz and Pep8 use emscripten
+               // We put aside the module of each program and bring it back before each use
+               var VizModule = null
                $(document).ready(function() {
                        // Report full loading
                        $("#loading").hide()
                        $("#analyze").prop('disabled', false)
+
                });
 
                function exec() {
                </div>
          </div>
        
+       <script>
+               var Module = {
+                       'print': function(text) {
+                               $("#console").append(text + "<br>")
+                       },
+                       'noInitialRun': true,
+               }
+       </script>
        <script src="pep8analysis.js"></script>
-       <script>var Pep8Module = Module</script>
+       <script>Pep8Module = Module</script>
+       <script src="viz.js"></script>
 </div>
 
 </body>