-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
84 lines (75 loc) · 2.03 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
<!DOCTYPE html>
<html>
<head>
<title>Ungoogled Extension Installer 0.0.1</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="container">
<a href="https://github.com/DeuzivanLima/ungoogled-extension-installer" class="link">Access Source Code</a>
<input class="basic-input" type="text" placeholder="Extension URL" id="extension-url"/>
<input class="basic-input" type="text" placeholder="Your browser version" id="browser-version"/>
<button class="button-install" onclick="installExtension()">INSTALL</button>
<footer style="text-align: center">
<p>This tool is Open Source</p>
<p>chrome://flags/#extension-mime-request-handling</p>
</footer>
</div>
</body>
<script>
function installExtension() {
let extension = document.getElementById("extension-url")
let version = document.getElementById("browser-version")
if (extension.value.length <= 10) {
alert("Error: pass a valid url extension")
}
if (version.value.length <= 4) {
alert("Browser version invalid")
}
let id = extension.value.split("/").slice(-1)[0]
window.location.replace(`https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${version.value}&x=id%3D${id}%26installsource%3Dondemand%26uc`)
}
</script>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.link {
text-align: center;
}
footer {
color: gray;
font-size: 10pt;
text-align: center;
}
.container {
margin: auto;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
width: 400px;
height: 400px;
padding: 1rem;
display: flex;
position: relative;
top: 25vh;
flex-direction: column;
justify-content: center;
gap: 1rem;
border-radius: 10px;
}
.basic-input {
padding: 1rem;
outline: none;
width: 100%;
border-radius: 10px;
border: 1px solid black;
}
.button-install {
background-color: rgb(50, 255, 50);
border: none;
padding: 1rem;
border-radius: 10px;
}
</style>
</html>