This repository has been archived by the owner on Aug 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
69 lines (64 loc) · 2.19 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>jsCore</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="test/test.css">
</head>
<body>
<div class="page">
<img src="jscore-logo.png" alt="jsCore logotype">
<h1>jsCore</h1>
<p>Complex polyfill and set of methods</p>
<a class="github" href="https://github.com/Octane/jsCore/">GitHub</a>
<fieldset>
<legend>Test versions</legend>
<div>
<button id="test-open">Open</button>
<button id="test-close">Close</button>
</div>
</fieldset>
</div>
<script>
new function () {
try {
console.log;
}
catch (error) {
window.console = {
log: function () {
var pre = document.createElement('pre');
pre.appendChild(document.createTextNode(
Array.prototype.join.call(arguments, ', ')
));
document.body.appendChild(pre);
}
};
}
function addScript(src, timestamp) {
document.writeln('<script src="' + src + '?no-cache=' + timestamp + '"></scr' + 'ipt>');
}
function addScripts(files) {
var timestamp = (new Date).getTime().toString(35),
length = files.length,
i = 0;
while (i < length) {
addScript('src/' + files[i], timestamp);
i++;
}
addScript('test/test.js', timestamp);
}
var xhr = new XMLHttpRequest;
xhr.open('GET', '/build/file-order.json', false);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status >= 200 && xhr.status < 400) {
addScripts(JSON.parse(xhr.responseText));
}
};
xhr.send();
};
</script>
</body>
</html>