source code beautification
authorgregor herrmann <gregor@toastfreeware.priv.at>
Wed, 3 Oct 2018 17:23:58 +0000 (19:23 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Wed, 3 Oct 2018 19:16:17 +0000 (21:16 +0200)
change embedded owm script to insert the <script> at a different place.
makes viewing the source nicer.

web/templates/seepark_web.html

index 3f29501..09f17dc 100644 (file)
@@ -20,6 +20,8 @@
                <script src="{{url_for('static', filename='c3.min.js')}}"></script>
                <script src="{{url_for('static', filename='strftime-min.js')}}"></script>
 
+               <!-- here the owm script will be appended -->
+
                <title>Seepark Obsteig</title>
        </head>
        <body>
@@ -69,7 +71,7 @@
                        script.async = true;
                        script.charset = "utf-8";
                        script.src = "//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js";
-                       var s = document.getElementsByTagName('script')[0];
+                       var s = document.getElementsByTagName('title')[0];
                        s.parentNode.insertBefore(script, s);
                })();
                </script>