-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
139 lines (134 loc) · 7.05 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta name="description" content="Powerology Downloads Page">
<meta name="author" content="Aiden">
<meta name="keywords" content="Powerology" >
<link rel="shortcut icon" type="icon/ico" href="images/icon.ico"/>
<title>Powerology Extention</title>
<title></title>
<style>
:root{
--sgy-font-default: 'Sgy Open Sans', 'Open Sans', Helvetica, Arial, sans-serif;
}
@font-face {
font-family: "Sgy Open Sans";
font-style: normal;
font-weight: 400;
src: local("Sgy Open Sans Regular"), local("OpenSansCore-Regular"),
url(https://ui.schoology.com/design-system/assets/open-sans-latin-regular.cffb686d7d2f4682df8342bd4d276e09.woff2)
format("woff2"),
url(https://ui.schoology.com/design-system/assets/open-sans-latin-regular.bf2d0783515b7d75c35bde69e01b3135.woff)
format("woff")
}
.image {
position: absolute;
z-index: -20;
transform: translate(-50%,-50%);
width: 25vw;
box-shadow: 5px 5px 3px 0px rgba(0, 0, 0, 0.15);
}
</style>
</head>
<body style="margin: 0px;">
<header>
<div style="width: 100%; text-align: center; font-family: var(--sgy-font-default); background-color: aquamarine; margin: 0; height: fit-content; padding-top: 20px; padding-bottom: 20px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15);">
<h1 style="font-size: 100px; line-height: 10px;">Powerology</h1>
<h3>An Addon Developed to Fix Post Oak's Schoology</h3>
<a href="https://chromewebstore.google.com/detail/degjiicdcipklknoenglihplioiemkgk" style="text-decoration: none;">
<button style="width: 20%; text-decoration: none; text-align: center; padding: 5px;">Want it on Chrome | Brave | Opera?<img src="images/chrome.png" style="width: 15px; margin: 0px 2px 0px 10px; transform: translateY(2px);"><img src="images/brave.png" style="width: 15px; margin: 0px 2px 0px 2px; transform: translateY(2px);"><img src="images/opera.png" style="width: 15px; margin: 0px 2px 0px 2px; transform: translateY(2px);"></button>
</a>
</div>
</header>
<main id="body">
<table style="text-align: center; margin-left: 50%; transform: translate(-50%); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15); padding: 10px; margin-top: 25px; margin-bottom: 50px;">
<tr>
<td>
<img src="images/chromeIcon.png" width="150" height="150">
</td>
<td style="padding-left: 20px;">
<h2>Dev Release</h2>
<a href="https://github.com/N0madical/Powerology/archive/refs/heads/main.zip" style="text-decoration: none;">
<button style="display: block; margin-left: 50%; margin-right: 50%; transform: translateX(-50%); width: 200px; height: 50px; margin-top: 15%; text-decoration: none;"><img src="images/github.png" style="width: 15px; padding-right: 5px; transform: translateY(2px);">Download</button>
</a>
</td>
</tr>
</table>
<a href="https://github.com/N0madical/Powerology" style="text-decoration: none;">
<button style="display: block; margin-left: 50%; margin-right: 50%; transform: translateX(-50%); width: 200px; height: 50px; margin-top: 25px; margin-bottom: 25px; text-decoration: none;"><img src="images/github.png" style="width: 15px; padding-right: 5px; transform: translateY(2px);">Open Github</button>
</a>
<a href="https://github.com/N0madical/Powerology/issues" style="text-decoration: none;">
<button style="display: block; margin-left: 50%; margin-right: 50%; transform: translateX(-50%); width: 200px; height: 50px; margin-top: 25px; margin-bottom: 25px; text-decoration: none;">Submit Bug Report</button>
</a>
<p style="display: none;" id="latestversion">1.0</p>
<img class="image" src="images/preview1.png" style="left: 5%; top: 40%; transform: rotate(-15deg);">
<img class="image" src="images/preview2.png" style="left: 70%; top: 60%; transform: rotate(15deg);">
<img class="image" src="images/preview3.png" style="left: 5%; top: 80%; transform: rotate(-10deg);">
</main>
<footer></footer>
</body>
<script>
let versions = new XMLHttpRequest()
versions.open("GET", "https://api.github.com/repos/N0madical/Powerology/contents/versions")
versions.send()
versions.onload = () => {
versionlist = JSON.parse(versions.response)
for(var i = 0; i < versionlist.length; i++) {
vname = versionlist[i].name
vnumber = vname.substring(vname.indexOf("-v")+2).replace(".xpi", "")
if(i == versionlist.length-1) {
document.getElementById("body").insertAdjacentHTML("afterbegin", `
<table style="text-align: center; margin-left: 50%; transform: translate(-50%); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15); padding: 10px; margin-top: 50px;">
<tr>
<td>
<img src="images/chromeIcon.png" width="150" height="150">
</td>
<td style="padding-left: 20px;">
<h2>Version: ${vnumber}</h2>
<a href="versions/${vname}" style="text-decoration: none;">
<button style="display: block; margin-left: 50%; margin-right: 50%; transform: translateX(-50%); width: 200px; height: 50px; margin-top: 15%; text-decoration: none;"><img src="images/firefox.png" style="width: 15px; padding-right: 5px; transform: translateY(2px);">Firefox Install</button>
</a>
</td>
</tr>
</table>
`)
} else {
document.getElementById("body").insertAdjacentHTML("afterbegin", `
<table style="text-align: center; margin-left: 50%; transform: translate(-50%); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15); padding: 0px; margin-top: 25px; width: 400px">
<tr>
<td>
<img src="images/chromeIcon.png" width="50" height="50" style="padding-left: 20px;">
</td>
<td>
<h3>Version: ${vnumber}</h3>
</td>
<td style="padding-left: 20px;">
<a href="versions/${vname}" style="text-decoration: none;">
<button style="display: block; margin-left: 25%; margin-right: 75%; transform: translateX(-50%); width: 100px; height: 25px; margin-top: 2.5%; text-decoration: none;">Firefox Install</button>
</a>
</td>
</tr>
</table>
`)
}
latestversionp = document.getElementById("latestversion")
if(parseInt(latestversionp.innerHTML) <= parseInt(vnumber)) {
latestversionp.innerHTML = vnumber
}
}
}
addEventListener("resize", (event) => {
images = document.getElementsByClassName("image")
if(window.innerWidth <= 1200) {
for(i=0; i < images.length; i++) {
images[i].style.display = "none"
}
} else {
for(i=0; i < images.length; i++) {
images[i].style.display = "inherit"
}
}
})
</script>
</html>