-
Notifications
You must be signed in to change notification settings - Fork 1
/
extalwlst.html
155 lines (138 loc) · 5.36 KB
/
extalwlst.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ExtensionInstallAllowlist Opener</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 20px;
line-height: 1.6;
}
textarea {
width: 100%;
height: 150px;
margin-bottom: 10px;
border-radius: 5px;
resize: none;
}
button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}
#error {
color: #ff757e;
margin-top: 10px;
}
#outputLog {
text-align: left;
margin-top: 20px;
padding: 10px;
border: 1px solid #ccc;
max-height: 300px;
overflow-y: auto;
border-radius: 5px;
}
.logEntry {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.timestamp {
color: gray;
font-size: 0.8em;
user-select: none; /* Prevent text selection */
margin-right: 10px; /* Space between timestamp and link */
}
* {
background-color: black;
color: rgb(196, 196, 196);
font-family: monospace;
}
input,button {
background-color: #131313;
border: #0a0a0a;
border-width: 3px;
border-radius: 3px;
border-style: solid;
margin: 1.4px;
cursor: pointer;
}
.link-text {
color: #19ffc2;
text-decoration-style: wavy;
}
</style>
</head>
<body>
<h1><code style="color:#8c19ff;">ExtensionInstallAllowlist</code> Opener</h1>
<p>Type in <a href="chrome://policy" target="_blank" class="link-text">chrome://policy</a> in the URL bar.<br> Then search <code style="color:#8c19ff">ExtensionInstallAllowlist</code>, and then click <code style="color:#6bbaff">Show More</code>. Copy everything and paste it in here.</p>
<textarea id="jsonInput"></textarea>
<br>
<button onclick="generateLinks()">Generate Links</button>
<button id="openLinksBtn" onclick="openLinks()" disabled>Open All Links</button>
<div id="error"></div>
<div id="outputLog"></div>
<script>
let extensionLinks = [];
function formatTime(date) {
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
const milliseconds = String(date.getMilliseconds()).padStart(3, '0');
return `${hours}:${minutes}:${seconds}:${milliseconds}`;
}
function generateLinks() {
const jsonInput = document.getElementById('jsonInput').value;
const errorDiv = document.getElementById('error');
const outputLog = document.getElementById('outputLog');
const openLinksBtn = document.getElementById('openLinksBtn');
errorDiv.textContent = '';
outputLog.innerHTML = ''; // Clear previous output
extensionLinks = []; // Reset the links array
try {
const extensionIds = JSON.parse(jsonInput);
if (!Array.isArray(extensionIds)) {
throw new Error('Make sure you pasted the ENTIRE JSON array of the ExtensionInstallAllowlist');
}
const timestamp = formatTime(new Date());
// Generate and display links with timestamp
extensionIds.forEach((id) => {
if (typeof id === 'string' && id.trim()) {
const url = `https://chromewebstore.google.com/detail/${id.trim()}`;
extensionLinks.push(url);
// Append link to output log
const logEntry = document.createElement('div');
logEntry.className = 'logEntry';
const timestampElement = document.createElement('span');
timestampElement.className = 'timestamp';
timestampElement.textContent = `(${timestamp})`;
const linkElement = document.createElement('a');
linkElement.href = url;
linkElement.target = '_blank';
linkElement.rel = 'noopener noreferrer';
linkElement.textContent = url;
logEntry.appendChild(timestampElement);
logEntry.appendChild(linkElement);
outputLog.appendChild(logEntry);
} else {
console.warn(`Invalid extension ID: ${id}`);
}
});
// Enable the button to open all links
openLinksBtn.disabled = false;
} catch (e) {
errorDiv.textContent = `Error: ${e.message}`;
}
}
function openLinks() {
extensionLinks.forEach((url) => {
window.open(url, '_blank', 'noopener,noreferrer');
});
}
</script>
</body>
</html>