| 13 | <script> |
| 14 | (function (window, document) { |
| 15 | var loader = function () { |
| 16 | //fix for ie |
| 17 | if (!window.location.origin) { |
| 18 | window.location.origin = window.location.protocol + "//" + window.location.hostname |
| 19 | + (window.location.port ? ':' + window.location.port : ''); |
| 20 | } |
| 21 | var xmlhttp = new XMLHttpRequest(); |
| 22 | xmlhttp.onreadystatechange = function() { |
| 23 | if (xmlhttp.readyState == XMLHttpRequest.DONE ) { |
| 24 | var version = xmlhttp.status == 200 ? xmlhttp.responseText : "undefined"; |
| 25 | var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; |
| 26 | script.src = "http://webswing.ewi.tudelft.nl/bart/javascript/webswing-embed.js?version="+version; |
| 27 | tag.parentNode.insertBefore(script, tag); |
| 28 | } |
| 29 | }; |
| 30 | xmlhttp.open("GET", "http://webswing.ewi.tudelft.nl/bart/rest/webswing/version", true); |
| 31 | xmlhttp.send(); |
| 32 | }; |
| 33 | window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader); |
| 34 | })(window, document); |
| 35 | </script> |
| 36 | |
| 37 | <!-- |