You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Kidnappd Test</title>
  5. <meta charset=utf-8>
  6. <link rel="stylesheet" type="text/css" href="style.css">
  7. </head>
  8. <body>
  9. <h1>Kidnapp'd</h1>
  10. <div id=btns>
  11. <div><button>inspectintent</button>
  12. </div>
  13. <div><button id=um>lookaroundintent</button>
  14. </div>
  15. <div><button>examineintent</button>
  16. </div>
  17. <div><button>takeintent</button>
  18. </div>
  19. <div><button>openintent</button>
  20. </div>
  21. <select id="itemList">
  22. <option>Tür</option>
  23. <option>Schloss</option>
  24. <option>Schlüssel</option>
  25. <option>Durchgang</option>
  26. </select>
  27. </div>
  28. <div id="output">
  29. <ol id="logList"></ol>
  30. </div>
  31. <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  32. <script>
  33. $("button").click(function(){
  34. if ($(this).text()==="lookaroundintent")
  35. {
  36. $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent=lookaroundintent");
  37. }
  38. else if ($(this).text()==="examineintent")
  39. {
  40. $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent=examineintent");
  41. }
  42. else
  43. {
  44. $.post("https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/IO?intent="+$(this).text()+"&slot="+replaceUml($("#itemList :selected").text()));
  45. }
  46. });
  47. function printOutput(data) {
  48. $("#output").animate({opacity:1},1000)
  49. $("#logList").append(("<li><span>" + data + "</span></li>"));
  50. }
  51. function replaceUml(value) {
  52. value = value.replace(/ä/g, 'ae');
  53. value = value.replace(/ö/g, 'oe');
  54. value = value.replace(/ü/g, 'ue');
  55. return value;
  56. }
  57. </script>
  58. </body>
  59. </html>