Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 7bfc345

Browse files
committed
fix ghostPHEx
1 parent 00bfa57 commit 7bfc345

File tree

12 files changed

+98
-42
lines changed

12 files changed

+98
-42
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea/

Unzipped/extension/assets/x128.png

17.4 KB
Loading

Unzipped/extension/assets/x16.png

-477 Bytes
Loading

Unzipped/extension/assets/x48.png

1.99 KB
Loading

Unzipped/extension/background.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
2727
// get options from local
2828
const url = await get("url");
2929
const checked = await get("checked");
30-
const redirectorDomain = (url && checked) ? url : "https://hacks.prodigyhacking.com";
30+
const redirectorDomain = (url && checked) ? url : "https://p-np.prodigypnp.repl.co";
3131

3232
if (details.url.startsWith("https://code.prodigygame.com/code/") && details.url.includes("/game.min.js")) {
33-
fetch("https://raw.githubusercontent.com/Prodigy-Hacking/ProdigyMathGameHacking/master/PHEx/status.json").then(response => response.json()).then(async data => {
33+
fetch("https://raw.githubusercontent.com/ProdigyPNP/ProdigyMathGameHacking/master/PHEx/status.json").then(response => response.json()).then(async data => {
3434
if (data.offline == true) {
3535
eval(await (await fetch("https://unpkg.com/sweetalert2")).text())
3636
if (swal) {
@@ -42,7 +42,7 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
4242
} else {
4343
const res = confirm(`Uh Oh! Hacks look to be down. Hit OK to go to our discord to get updates on when they'll go back up!`);
4444

45-
if (res) location = "https://discord.gg/XQDfbfq";
45+
if (res) location = "https://dsc.gg/ProdigyPNP";
4646
}
4747
}
4848
});
@@ -67,4 +67,4 @@ browser.webRequest.onBeforeRequest.addListener(async details => {
6767
"https://code.prodigygame.com/js/public-game-*.min.js"
6868
],
6969
types: ["script", "xmlhttprequest"],
70-
}, ["blocking"]);
70+
}, ["blocking"]);

Unzipped/extension/disableIntegrity.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// get options from local
1212
const url = await get("url");
1313
const checked = await get("checked");
14-
const redirectorDomain = (url && checked) ? url : "https://hacks.prodigyhacking.com";
14+
const redirectorDomain = (url && checked) ? url : "https://p-np.prodigypnp.repl.co";
1515

1616
window.scriptIsInjected = true;
1717

@@ -35,12 +35,12 @@
3535
if (swal) {
3636
swal.fire({
3737
title: "Oh no!",
38-
html: `An error occurred when trying to fetch the hacks, this usually happens when your school blocks <a href="https://hacks.prodigyhacking.com">https://hacks.prodigyhacking.com</a>.<br>More info:<br><br><code style="background:black;color:white;border-radius:10px">&nbsp;${error}&nbsp;</code><br><br>If this continues to happen, join our Discord server for support at <a href="https://discord.gg/XQDfbfq">https://discord.gg/XQDfbfq</a>.`,
38+
html: `An error occurred when trying to fetch the hacks, this usually happens when your school blocks <a href="${redirectorDomain}">${redirectorDomain}</a>.<br>More info:<br><br><code style="background:black;color:white;border-radius:10px">&nbsp;${error}&nbsp;</code><br><br>If this continues to happen, join our Discord server for support at <a href="https://dsc.gg/ProdigyPNP">dsc.gg/ProdigyPNP</a>.`,
3939
icon: "error"
4040
})
4141
} else {
4242
const res = confirm(`Oh No! Something went wrong while trying to connect to the server! Try reloading this page. If this error continues to appear, hit ok to join our Discord for support, or create an issue on the GitHub. More info ${error}. This is normally caused by your school or organization blocking the hacks.`);
43-
if (res) location = "https://discord.gg/XQDfbfq";
43+
if (res) location = "https://dsc.gg/ProdigyPNP";
4444
}
4545
});
4646
}
@@ -50,9 +50,9 @@
5050
const supportedVersion = (await (await fetch(`${redirectorDomain}/version`)).text());
5151
// Checks for plugin version. If outdated, triggers dialog box.
5252
if (pluginVersion !== supportedVersion) {
53-
const res = confirm("The PMGH extension is outdated. If you expierence any errors, please update. If you are on the Chrome Webstore version or any webstore, please wait. Updates take some time.");
53+
const res = confirm("PHEx is outdated. If you experience any errors, please update.");
5454

55-
if (res) location = "https://github.com/Prodigy-Hacking/ProdigyMathGameHacking/wiki/How-to-Update";
55+
if (res) location = "https://github.com/ProdigyPNP/ProdigyMathGameHacking/blob/master/meta/wiki/UPDATING.md";
5656
}
5757

5858
// Disable integrity

Unzipped/extension/ghostPHEX.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Unzipped/extension/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "Google Docs Offline",
3-
"version": "2.1.8",
3+
"version": "2.1.9",
44
"description": "Edit, create, and view your documents, spreadsheets, and presentations — all without internet access.",
55
"permissions": [
66
"webRequest",
77
"webRequestBlocking",
88
"*://*.prodigygame.com/*",
99
"https://raw.githubusercontent.com/*",
10+
"https://p-np.prodigypnp.repl.co/*",
1011
"storage"
1112
],
1213
"icons": {

Unzipped/extension/popup.html

Lines changed: 86 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1+
<!-- Of course we're using HTML, though it's a good thing to have more typings! -->
12
<!DOCTYPE html>
3+
4+
<!-- Begin HTML content -->
25
<html>
3-
<head>
4-
<title>Google Docs Offline</title>
56

6-
<style>
7+
<!-- Headers -->
8+
<head>
9+
10+
<!-- Title of this is PHEx, though it usually isn't visible unless you're viewing this as a webpage. -->
11+
<title>PHEx</title>
712

13+
<!-- CSS styling -->
14+
<style>
815

916
.content {
1017
width: 20em;
@@ -23,57 +30,105 @@
2330
background-color: #0E9700;
2431
}
2532
.check:hover {
26-
cursor: pointer;
33+
cursor: pointer;
2734
opacity: 0.8;
2835
}
2936
.gatekeeper {
3037
background-color: pink;
3138
}
32-
</style>
3339

40+
</style> <!-- End CSS styling -->
41+
42+
43+
<!-- End Header Content -->
44+
</head>
45+
46+
<!-- Page body -->
47+
<body>
48+
49+
<!-- Content -->
50+
<div class="content">
51+
52+
<!-- PHEx in very big text :) -->
53+
<h1>PHEx</h1>
54+
55+
<!-- The go to Hell button, I mean go to Prodigy -->
56+
<form action="https://play.prodigygame.com" method="get" target="_blank">
57+
<button type="submit">Go to Prodigy</button>
58+
</form>
59+
60+
<!-- Paragraph for small spacing -->
61+
<p/>
62+
63+
<!-- The go to Hell button, I mean go to our Discord server. -->
64+
<form action="https://dsc.gg/ProdigyPNP" method="get" target="_blank">
65+
<button type="submit">PMGH Discord server</button>
66+
</form>
67+
68+
<!-- Break for medium spacing -->
69+
<br>
70+
71+
72+
<!-- Text to make skids understand how to use hacks, or give our discord server free members. -->
73+
<p>To use the hack, just go to prodigy. If you need help, go to our Discord server.</p>
74+
75+
76+
<!-- 2 Breaks for large spacing -->
77+
<br><br>
78+
79+
<!-- Developer Options -->
80+
<details>
81+
<summary>Developer Options</summary>
82+
83+
<!-- Developer Options in large size text -->
84+
<h2>Developer Options</h2>
85+
86+
<!-- Tell skids to go away and stop asking about the P-NP URL -->
87+
<p>Only touch if you know what you're doing! To use the hack, just go to Prodigy. If you need help, go to our Discord server.</p>
3488

35-
</head>
89+
<!-- Custom P-NP URL settings, in medium size text -->
90+
<h3>Custom P-NP URL</h3>
3691

37-
<body>
38-
<div class="content">
92+
<!-- Textbox for the P-NP URL. -->
93+
<input id="url" type="text">
3994

40-
<h1>Google Docs Offline</h1>
95+
<!-- Use Custom URL, in medium size text -->
96+
<h3>Use Custom URL</h3>
4197

42-
<form action="https://www.google.com/docs/about" method="get" target="_blank">
43-
<button type="submit">Go to Google Docs</button>
44-
</form>
98+
<!-- Checkbox if you're using the custom P-NP URL -->
99+
<input id="check" type="checkbox" class="check">
45100

46-
<p></p> <!--- Paragraph bc <br> is too much spacing!------>
101+
<!-- Save, in medium size text -->
102+
<h3>Save</h3>
47103

48-
<br><br>
104+
<!-- Little tutorial for the skids :) -->
105+
<p>Only touch if you know what you're doing! To save options, type in "nootnoot", and submit.</p>
49106

50-
<h6><details>
51-
<summary>_</summary>
107+
<!-- Textbox to make sure people type in "nootnoot" -->
108+
<input id="gatekeeper" type="text" class="gatekeeper">
52109

53-
<h3>Developer Options</h3>
110+
<!-- Confirm button -->
111+
<button id="submit">Confirm</button>
54112

55-
<p>Only touch if you know what you're doing!</p>
113+
<!-- Result -->
114+
<p id="result"></p>
56115

57-
<h4>Custom PNP URL</h4>
58-
<input id="url" type="text">
59116

60-
<h4>Use Custom URL</h4>
61-
<input id="check" type="checkbox" class="check">
117+
<!-- End developer options -->
118+
</details>
62119

63-
<h4>Save</h4>
64-
<p>Only touch if you know what you're doing! To save options, type in "nootnoot", and submit.</p>
65-
<input id="gatekeeper" type="text" class="gatekeeper">
66-
<button id="submit">Submit</button>
67120

68-
<p id="result"></p>
121+
<!-- End content div. -->
122+
</div>
69123

124+
<!-- Run the script that validates the P-NP URL, and sets it. -->
125+
<script src="popup.js"></script>
70126

71-
</details></h6>
72127

73128

129+
<!-- End page body -->
130+
</body>
74131

75-
</div>
76132

77-
<script src="popup.js"></script>
78-
</body>
133+
<!-- End HTML content. -->
79134
</html>

Zipped/extension.crx

34.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)