@Fhillis/

plat level creator

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • classes.js
  • index.js
  • level.js
  • README
  • tutorial.js
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html><head><title>Plat!</title><link rel="icon" href="https://plat-online-testing-environment.fhillis.repl.co/favicon.ico"/><style>* {margin: 0; padding: 0}
.fullscreen {
  height: 100%; 
  width: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  width:100%;
}</style></head><body><canvas class="fullscreen" id="plat">Oops! Something went wrong!</canvas><script src="classes.js"></script><script src="index.js"></script><script>var level = "tester";
var token = "73hOK3W8-XeLhVMZ2HaMFC0fD21Gpo9STU5w"

function fileExists(urlToFile) {
  var xhr = new XMLHttpRequest();
  xhr.open('HEAD', urlToFile, false);
  xhr.send();
  
  if (xhr.status == "404") {
    return false;
  } else {
    return true;
  }
}

if (fileExists("level.js")) {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.src = "level.js";
  document.body.appendChild(script);
  script.onload = () => {
    start();
  };
} else {
  setState(-1);
  start();
}</script></body></html>
result
console