Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
fix PHEx 2.1.6, build
Browse files Browse the repository at this point in the history
  • Loading branch information
PatheticMustan committed Jul 7, 2021
1 parent d8f6833 commit d498614
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
Binary file modified PHEx/build/extension.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion PHEx/src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ function get(key) {
// Redirect Requests
browser.webRequest.onBeforeRequest.addListener(async details => {
// get options from local
const [ url, checked ] = ["url", "checked"].map(v => await get(v));
const url = await get("url");
const checked = await get("checked");
const redirectorDomain = (url && checked) ? url : "https://hacks.prodigyhacking.com";

if (details.url.startsWith("https://code.prodigygame.com/code/") && details.url.includes("/game.min.js")) {
Expand Down
15 changes: 15 additions & 0 deletions PHEx/src/disableIntegrity.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
(async () => {
function get(key) {
return new Promise(resolve => {
chrome.storage.local.get([key], result => {
resolve(result[key]);
});
});
}

if (!window.scriptIsInjected) {
// get options from local
const url = await get("url");
const checked = await get("checked");
const redirectorDomain = (url && checked) ? url : "https://hacks.prodigyhacking.com";

window.scriptIsInjected = true;

function redirectorCheck() {
Expand Down Expand Up @@ -43,11 +56,13 @@
}

// Disable integrity
console.groupCollapsed("integrity patches");
[...document.getElementsByTagName("script"), ...document.getElementsByTagName("link")].forEach(v => {
if (v.integrity) {
console.log(v.integrity);
v.removeAttribute("integrity");
}
});
console.groupEnd("integrity patches");
}
})();

0 comments on commit d498614

Please sign in to comment.