-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
109 lines (93 loc) · 3.32 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<head>
<style>
body {
display: flex;
align-items: center;
flex-direction: column;
}
#content {
background-color: rgb(222, 222, 222);
border-radius: 10px;
width: 50%;
display: flex;
align-self: center;
align-items: center;
flex-direction: column;
}
</style>
<link rel="icon" type="image/x-icon" href="favicon.png">
<title>Version crawler</title>
</head>
<body>
<div id="content">
<div>
<h2>Current minimal build version is:</h2>
</div>
<div>
<p id="min_version"></p>
</div>
<div>
<details>
<summary>About</summary>
This page tells you a minimal build number to install Unigram<br>
This number is taken from <a
href="https://github.com/UnigramDev/Unigram/blob/develop/Telegram/Telegram.csproj">this
file</a><br>
Links to check build numbers to version relations:
<ul>
<li>
<a href="https://learn.microsoft.com/en-us/windows/release-health/release-information">Windows 10
(MS)</a>
</li>
<li>
<a href="https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information">Windows
11 (MS)</a>
</li>
<li>
<a href="https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions">Wikipedia</a>
</li>
</ul>
</details>
</div>
</div>
<script>
var xmlHttp = new XMLHttpRequest();
xmlHttp.open(
"GET",
"https://raw.githubusercontent.com/UnigramDev/Unigram/develop/Telegram/Telegram.csproj",
false
); // Synchronous because I don't care :)
xmlHttp.send(null); //Null body
XMLToParse = xmlHttp.responseText;
parser = new DOMParser();
xmlDoc = parser.parseFromString(XMLToParse, "application/xml");
var first_element = xmlDoc.firstChild;
var property_group = null;
var min_version_node = null;
children = first_element.children;
for (let index = 0; index < children.length; index++) {
const element = children[index];
if (element.nodeName == "PropertyGroup") {
property_group = element;
break;
}
}
if (property_group == null) {
document.write("ERROR! PropertyGroup not found!");
}
children = property_group.children;
for (let index = 0; index < children.length; index++) {
const element = children[index];
if (element.nodeName == "TargetPlatformMinVersion") {
min_version_node = element;
break;
}
}
if (min_version_node == null) {
document.write("ERROR! TargetPlatformMinVersion not found!");
}
var min_version = document.getElementById("min_version");
min_version.innerText = min_version_node.textContent;
</script>
</body>