| 24 | var webswingInstance0 = |
| 25 | { |
| 26 | options: |
| 27 | { |
| 28 | autoStart: true, |
| 29 | connectionUrl:'https://webswing.ewi.tudelft.nl/bart/', |
| 30 | args: getParam('args'), |
| 31 | recording: getParam('recording'), |
| 32 | binarySocket: getParam('binarySocket'), |
| 33 | debugPort: getParam('debugPort'), |
| 34 | recordingPlayback: getParam('recordingPlayback'), |
| 35 | securityToken: getParam('securityToken'), |
| 36 | realm: getParam('realm'), |
| 37 | debugLog: getParam('debugLog') |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | function getParam(name) { |
| 42 | name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); |
| 43 | var results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(location.href); |
| 44 | return results == null ? null : decodeURIComponent(results[1]); |
| 45 | } |
| 46 | </script> |
| 47 | |
| 48 | <script data-webswing-global-var="webswing"> |
12 | | var loader = function () { |
13 | | //fix for ie |
14 | | if (!window.location.origin) { |
15 | | window.location.origin = window.location.protocol + "//" + window.location.hostname |
16 | | + (window.location.port ? ':' + window.location.port : ''); |
17 | | } |
18 | | var xmlhttp = new XMLHttpRequest(); |
19 | | xmlhttp.onreadystatechange = function() { |
20 | | if (xmlhttp.readyState == XMLHttpRequest.DONE ) { |
21 | | var version = xmlhttp.status == 200 ? xmlhttp.responseText : "undefined"; |
22 | | var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; |
23 | | script.src = document.location.origin + document.location.pathname + "javascript/webswing-embed.js?version="+version; |
24 | | tag.parentNode.insertBefore(script, tag); |
| 50 | var loader = function () { |
| 51 | //fix for ie |
| 52 | if (!window.location.origin) { |
| 53 | window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); |
| 55 | var baseUrl = 'https://webswing.ewi.tudelft.nl/bart/'; |
| 56 | var xmlhttp = new XMLHttpRequest(); |
| 57 | xmlhttp.onreadystatechange = function () { |
| 58 | if (xmlhttp.readyState == XMLHttpRequest.DONE) { |
| 59 | var version = xmlhttp.status == 200 ? xmlhttp.responseText : "undefined"; |
| 60 | var script = document.createElement("script"), |
| 61 | tag = document.getElementsByTagName("script")[0]; |
| 62 | script.src = baseUrl + "javascript/webswing-embed.js?version=" + version; |
| 63 | tag.parentNode.insertBefore(script, tag); |
| 64 | } |
| 65 | }; |
| 66 | xmlhttp.open("GET", baseUrl + "rest/version", true); |
| 67 | xmlhttp.send(); |