|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>Kidnappd Test</title>
- <meta charset=utf-8>
- <link rel="stylesheet" type="text/css" href="style.css">
-
-
- </head>
- <body>
- <h1>Kidnapp'd</h1>
- <div id=btns>
-
- <div><button>inspectintent</button>
- </div>
- <div><button id=um>lookaroundintent</button>
- </div>
- <div><button>examineintent</button>
- </div>
- <div><button>takeintent</button>
- </div>
- <div><button>openintent</button>
- </div>
- <select id="itemList">
- <option>Tür</option>
- <option>Schloss</option>
- <option>Schlüssel</option>
- </select>
- </div>
- <div id="output">
- <ol id="logList"></ol>
- </div>
- <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
- <script>
-
- $("button").click(function(){
- if ($(this).text()==="lookaroundintent")
- {
- $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent=lookaroundintent");
- }
- else if ($(this).text()==="examineintent")
- {
- $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent=examineintent");
- }
- else
- {
- $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent="+$(this).text()+"&slot="+replaceUml($("#itemList :selected").text()));
- }
- });
-
- function printOutput(data) {
- $("#output").animate({opacity:1},1000)
- $("#logList").append(("<li><span>" + data + "</span></li>"));
- }
-
- function replaceUml(value) {
- value = value.replace(/ä/g, 'ae');
- value = value.replace(/ö/g, 'oe');
- value = value.replace(/ü/g, 'ue');
- return value;
-
- }
- </script>
-
- </body>
- </html>
|