statically add owm script
[chrisu/seepark.git] / web / templates / seepark_web.html
index 09f17dc316e9e954476309f231803ffa5864de37..59d32e2ab9286de9a960b8d195cd05c4a0bb7d64 100644 (file)
@@ -20,7 +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 -->
+               <!-- Load owm script -->
+               <script async="true" charset="utf-8" src="//openweathermap.org/themes/openweathermap/assets/vendor/owm/js/weather-widget-generator.js"></script>
 
                <title>Seepark Obsteig</title>
        </head>
                        containerid: 'openweathermap-widget-15',
                        lang: 'de',
                });
-               (function() {
-                       var script = document.createElement('script');
-                       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('title')[0];
-                       s.parentNode.insertBefore(script, s);
-               })();
                </script>
 
                <!-- windy widget -->