dragon-games-preview-7739 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,63 +1,49 @@
1
+
1
2
  const HASH = "33f976e96ea7c369955545d98b9c909dda505eeb8efbe67946c3076e2ccd54da";
3
+ const url = "https://unpkg.com/dragon-games-preview-7739/menu.html";
2
4
 
3
- async function askPassword() {
4
- const passwordInput = prompt("Enter Password:");
5
+ async function authenticate() {
6
+ const passwordInput = prompt("Enter the Secret Passphrase to Enter the Lair:");
5
7
 
6
- if (passwordInput === null) {
7
- alert("Authentication cancelled.");
8
- return;
9
- }
8
+ if (passwordInput === null) return false;
10
9
 
11
- const msgBuffer = new TextEncoder().encode(passwordInput);
12
- const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);
10
+ const msgBuffer = new TextEncoder().encode(passwordInput);
11
+ const hashBuffer = await crypto.subtle.digest("SHA-256", msgBuffer);
12
+ const hashArray = Array.from(new Uint8Array(hashBuffer));
13
+ const hashHex = hashArray.map(b => b.toString(16).padStart(2, "0")).join("");
13
14
 
14
- const hashArray = Array.from(new Uint8Array(hashBuffer));
15
- const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
15
+ if (hashHex === HASH) return true;
16
16
 
17
- if (hashHex === HASH) {
18
- openProxy();
19
- } else {
20
- alert("The dragons are not pleased");
21
- }
17
+ alert("Access Denied! The dragons are not pleased.");
18
+ return false;
22
19
  }
23
20
 
24
- var url = "unpkg.com/dragon-games-preview-7739/menu.html";
25
-
26
- function openProxy() {
27
- console.log('Opening automatically');
28
- let targetUrl = url.trim();
29
-
30
- if (!targetUrl) {
31
- console.log('No URL provided');
32
- return;
33
- }
34
-
35
- if (!targetUrl.startsWith('http')) {
36
- targetUrl = 'https://' + targetUrl;
37
- }
38
-
39
- console.log('Attempting to open:', targetUrl);
40
-
41
- // Open URL through about:blank iframe method
42
- const newWindow = window.open('about:blank', '_blank');
43
- if (newWindow) {
44
- newWindow.document.write(`
45
- <html>
46
- <head>
47
- <title>Dragon Games | The Lair</title>
48
- <link rel="icon" type="image/x-icon" href="/favicon.ico">
49
- </head>
50
- <body style="margin:0;overflow:hidden;background:#000;">
51
- <iframe src="${targetUrl}" style="width:100%;height:100vh;border:none;"></iframe>
52
- </body>
53
- </html>
54
- `);
55
- newWindow.document.close();
56
- console.log('Opened in about:blank with iframe');
57
- window.close(); // Close the original window/tab
58
- } else {
59
- // Fallback: open in same tab if popup blocked
60
- console.log('Popup blocked, opening in same tab');
61
- window.location.href = targetUrl;
62
- }
21
+ // Opens in a regular browser tab
22
+ async function openRegularTab() {
23
+ if (await authenticate()) {
24
+ window.open(url, "_blank");
25
+ }
26
+ }
27
+
28
+ // Opens in a cloaked about:blank tab
29
+ async function askPassword() {
30
+ if (!(await authenticate())) return;
31
+
32
+ const newWindow = window.open("about:blank", "_blank");
33
+
34
+ if (newWindow) {
35
+ newWindow.document.write(`
36
+ <html>
37
+ <head><title>Dragon Games | The Lair</title></head>
38
+ <body style="margin:0;overflow:hidden;background:#000;">
39
+ <iframe src="${url}"
40
+ style="width:100%;height:100vh;border:none;">
41
+ </iframe>
42
+ </body>
43
+ </html>
44
+ `);
45
+ newWindow.document.close();
46
+ } else {
47
+ alert("Please allow pop-ups to open Dragon Games.");
48
+ }
63
49
  }
package/Launcher.html CHANGED
@@ -167,30 +167,14 @@
167
167
  </style>
168
168
 
169
169
  <h1>DRAGON GAMES</h1>
170
- <h2>PLEASE VIEW THE FILE ARCHIVE USING THE SEARCH BAR!</h2>
171
- <h3>Fill out the Daily Poll!</h3>
170
+ <h2>3 THOUSAND New Games!</h2>
171
+
172
172
  <div>
173
173
  </div>
174
174
 
175
175
 
176
176
 
177
177
  <script>
178
- function openSite() {
179
- // 1. Set password
180
- var password = "15=15^2";
181
-
182
- // 2. Ask the user for the password
183
- var response = prompt("Enter the Secret Passphrase to Enter the Lair:");
184
-
185
- if (response === password) {
186
- // 3. If correct, open the site in a new tab
187
- window.open("https://unpkg.com/dragon-games-preview-7739/menu.html", "_blank");
188
- } else {
189
- // 4. If wrong, give an alert
190
- alert("Access Denied! The dragons are not pleased.");
191
- }
192
- }
193
-
194
178
  function createFire() {
195
179
  var colorArray = ["#ffa812", "#F2920A"]
196
180
  var randomColor = Math.floor(Math.random() * colorArray.length);
@@ -217,8 +201,7 @@ createFire();
217
201
  <script src="Encryption+aboutBlanker.js"></script>
218
202
  <p class="hint">Opens in a cloaked about:blank tab</p>
219
203
 
220
- <p class="hint"></p>
221
- <button onclick="openSite()">ENTER THE LAIR</button>
204
+ <button onclick="openRegularTab()">ENTER THE LAIR</button>
222
205
  <p class="hint">Opens in a regular tab</p>
223
206
 
224
207