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