Changes between Version 6 and Version 7 of TestWebSwing2


Ignore:
Timestamp:
11/15/18 16:13:12 (6 years ago)
Author:
Bart Vastenhouw
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestWebSwing2

    v6 v7  
    1 {{{#!html
    2 Testing 1 2 3 4
    3 <div class="webswing-element" data-webswing-instance="webswingInstance0">
    4     <div id="loading" class="ws-modal-container">
    5         <div class="ws-login">
    6                                 <div  class="ws-login-content"><div class="ws-spinner"><div class="ws-spinner-dot-1"></div> <div class="ws-spinner-dot-2"></div></div></div>
    7                 </div>
    8             </div>
    9         </div>
    10 <script>
    11     var webswingInstance0 =
    12     {
    13         options:
    14         {
    15             autoStart: true,
    16             connectionUrl:'https://webswing.ewi.tudelft.nl/bart/',
    17             args: getParam('args'),
    18             recording: getParam('recording'),
    19             binarySocket: getParam('binarySocket'),
    20             debugPort: getParam('debugPort'),
    21             recordingPlayback: getParam('recordingPlayback'),
    22             securityToken: getParam('securityToken'),
    23             realm: getParam('realm'),
    24             debugLog: getParam('debugLog')
    25         }
    26     }
    27 
    28     function getParam(name) {
    29         name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    30         var results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(location.href);
    31         return results == null ? null : decodeURIComponent(results[1]);
    32     }
    33 </script>
    34 
    35 <script data-webswing-global-var="webswing">
    36     (function (window, document) {
    37         var loader = function () {
    38             //fix for ie
    39             if (!window.location.origin) {
    40                 window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
    41             }
    42             var baseUrl = 'https://webswing.ewi.tudelft.nl/bart/';
    43             var xmlhttp = new XMLHttpRequest();
    44             xmlhttp.onreadystatechange = function () {
    45                 if (xmlhttp.readyState == XMLHttpRequest.DONE) {
    46                     var version = xmlhttp.status == 200 ? xmlhttp.responseText : "undefined";
    47                     var script = document.createElement("script"),
    48                         tag = document.getElementsByTagName("script")[0];
    49                     script.src = baseUrl + "javascript/webswing-embed.js?version=" + version;
    50                     tag.parentNode.insertBefore(script, tag);
    51                 }
    52             };
    53             xmlhttp.open("GET", baseUrl + "rest/version", true);
    54             xmlhttp.send();
    55         };
    56         window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
    57     })(window, document);
     1{{{
     2#!html
     3<script type="text/javascript" >
     4   alert("Test1");
    585</script>
    596}}}