refactor: remove auto jailbreak feature and related UI elements
This commit is contained in:
@@ -40,7 +40,6 @@ const ui = {
|
|||||||
settingsPopup: document.getElementById('settings-popup'),
|
settingsPopup: document.getElementById('settings-popup'),
|
||||||
|
|
||||||
// Settings elements
|
// Settings elements
|
||||||
autoJbCheckbox: document.getElementById('autoJbBox'),
|
|
||||||
langRadios: document.querySelectorAll('#chooselang input[name="language"]'),
|
langRadios: document.querySelectorAll('#chooselang input[name="language"]'),
|
||||||
};
|
};
|
||||||
const languages = {
|
const languages = {
|
||||||
@@ -64,7 +63,6 @@ const languages = {
|
|||||||
"closeButton": "Close",
|
"closeButton": "Close",
|
||||||
"settingsPsfreeHeader": "Settings",
|
"settingsPsfreeHeader": "Settings",
|
||||||
"ps4FirmwareSupportedHeader": "Supported PS4 firmware",
|
"ps4FirmwareSupportedHeader": "Supported PS4 firmware",
|
||||||
"autoJailbreakText": "Jailbreak automatically",
|
|
||||||
"languageHeader": "Language",
|
"languageHeader": "Language",
|
||||||
"englishOption": "English",
|
"englishOption": "English",
|
||||||
"arabicOption": "Arabic",
|
"arabicOption": "Arabic",
|
||||||
@@ -99,7 +97,6 @@ const languages = {
|
|||||||
"closeButton": "إغلاق",
|
"closeButton": "إغلاق",
|
||||||
"settingsPsfreeHeader": "الإعدادات",
|
"settingsPsfreeHeader": "الإعدادات",
|
||||||
"ps4FirmwareSupportedHeader": "إصدارات PS4 المدعومة",
|
"ps4FirmwareSupportedHeader": "إصدارات PS4 المدعومة",
|
||||||
"autoJailbreakText": "تهكير تلقائي",
|
|
||||||
"languageHeader": "اللغة",
|
"languageHeader": "اللغة",
|
||||||
"arabicOption": "العربية",
|
"arabicOption": "العربية",
|
||||||
"englishOption": "الإنجليزية",
|
"englishOption": "الإنجليزية",
|
||||||
@@ -507,18 +504,6 @@ ui.psLogoContainer.addEventListener('click', () => {
|
|||||||
ui.exploitScreen.scrollIntoView({ block: "end" })
|
ui.exploitScreen.scrollIntoView({ block: "end" })
|
||||||
});
|
});
|
||||||
|
|
||||||
// Auto jailbreak
|
|
||||||
ui.autoJbCheckbox.addEventListener('change', (e) => {
|
|
||||||
isAutoJailbreakEnabled = e.target.checked;
|
|
||||||
localStorage.setItem('autoJailbreak', e.target.checked);
|
|
||||||
if (e.target.checked) {
|
|
||||||
if (confirm(languages[currentLanguage].jailbreakNow + currentJbFlavor)) {
|
|
||||||
settingsPopup()
|
|
||||||
ui.exploitScreen.scrollIntoView({ block: "end" })
|
|
||||||
jailbreak();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// tabs switching
|
// tabs switching
|
||||||
ui.toolsTab.addEventListener('click', () =>{
|
ui.toolsTab.addEventListener('click', () =>{
|
||||||
if (ui.toolsSection.classList.contains('hidden')){
|
if (ui.toolsSection.classList.contains('hidden')){
|
||||||
@@ -639,16 +624,6 @@ async function Loadpayloads(payload) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadAutoJb() {
|
|
||||||
ui.autoJbCheckbox.checked = isAutoJailbreakEnabled == 'true' ? true : false;
|
|
||||||
if (isAutoJailbreakEnabled == 'true') {
|
|
||||||
if (confirm(languages[currentLanguage].jailbreakNow + currentJbFlavor)) {
|
|
||||||
ui.exploitScreen.scrollIntoView({ block: "end" })
|
|
||||||
jailbreak();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setGoldHENVer(value){
|
function setGoldHENVer(value){
|
||||||
localStorage.setItem('GHVer', value);
|
localStorage.setItem('GHVer', value);
|
||||||
}
|
}
|
||||||
@@ -706,7 +681,6 @@ function applyLanguage(lang) {
|
|||||||
|
|
||||||
// Settings popup
|
// Settings popup
|
||||||
ui.settingsPopup.querySelector('h2').textContent = strings.settingsPsfreeHeader;
|
ui.settingsPopup.querySelector('h2').textContent = strings.settingsPsfreeHeader;
|
||||||
ui.settingsPopup.querySelector('#autojbchkb p').textContent = strings.autoJailbreakText;
|
|
||||||
ui.settingsPopup.querySelector('#chooselang h3').textContent = strings.languageHeader;
|
ui.settingsPopup.querySelector('#chooselang h3').textContent = strings.languageHeader;
|
||||||
ui.settingsPopup.querySelector('#enLang').textContent = strings.englishOption;
|
ui.settingsPopup.querySelector('#enLang').textContent = strings.englishOption;
|
||||||
ui.settingsPopup.querySelector('#arLang').textContent = strings.arabicOption;
|
ui.settingsPopup.querySelector('#arLang').textContent = strings.arabicOption;
|
||||||
@@ -768,14 +742,38 @@ function CheckFW() {
|
|||||||
let fwVersion = navigator.userAgent.substring(navigator.userAgent.indexOf('5.0 (') + 19, navigator.userAgent.indexOf(') Apple')).replace("layStation 4/","");
|
let fwVersion = navigator.userAgent.substring(navigator.userAgent.indexOf('5.0 (') + 19, navigator.userAgent.indexOf(') Apple')).replace("layStation 4/","");
|
||||||
const elementsToHide = [
|
const elementsToHide = [
|
||||||
'ps-logo-container', 'choosejb-initial', 'exploit-main-screen', 'scrollDown',
|
'ps-logo-container', 'choosejb-initial', 'exploit-main-screen', 'scrollDown',
|
||||||
'payloadsbtn', 'autojbchkb', 'click-to-start-text', 'chooseGoldHEN'
|
'payloadsbtn', 'click-to-start-text', 'chooseGoldHEN'
|
||||||
];
|
];
|
||||||
|
|
||||||
if (ps4Regex.test(userAgent)) {
|
if (ps4Regex.test(userAgent)) {
|
||||||
if (fwVersion >= 7.00 && fwVersion <= 9.60) {
|
if (fwVersion >= 7.00 && fwVersion <= 9.60) {
|
||||||
document.getElementById('PS4FW').style.color = 'green';
|
document.getElementById('PS4FW').style.color = 'green';
|
||||||
let fwElement = "fw"+fwVersion.replace('.','');
|
|
||||||
document.getElementById(fwElement).classList.add('fwSelected');
|
// Highlight firmware in about popup
|
||||||
|
let fwElement = "fw"+fwVersion.replace('.','');
|
||||||
|
document.getElementById(fwElement).classList.add('fwSelected');
|
||||||
|
// Display only Compatible GoldHENs
|
||||||
|
const GoldHENsOption = {
|
||||||
|
"9.60": ["GHv2.3Fw755", "GHv2.3Fw702"],
|
||||||
|
"9.00": ["GHv2.3Fw755", "GHv2.3Fw702"],
|
||||||
|
"9.03": ["GHv2.3Fw755", "GHv2.3Fw702", "GHv2.4b18", "GHv2.4b18.2"],
|
||||||
|
"7.55": ["GHv2.4b18.4", "GHv2.4b18.2", "GHv2.4b18"],
|
||||||
|
"7.02": ["GHv2.4b18.4", "GHv2.4b18.2", "GHv2.4b18"]
|
||||||
|
};
|
||||||
|
// To remove all of them with one line in case the firmware is not listed
|
||||||
|
const allElements = [
|
||||||
|
"GHv2.3Fw755",
|
||||||
|
"GHv2.3Fw702",
|
||||||
|
"GHv2.4b18",
|
||||||
|
"GHv2.4b18.4",
|
||||||
|
"GHv2.4b18.2"
|
||||||
|
];
|
||||||
|
const idsToRemove = GoldHENsOption[ps4fw] || allElements;
|
||||||
|
|
||||||
|
idsToRemove.forEach(id => {
|
||||||
|
const el = document.getElementById(id);
|
||||||
|
if (el) el.remove();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('PS4FW').style.color = 'red';
|
document.getElementById('PS4FW').style.color = 'red';
|
||||||
|
|
||||||
@@ -785,29 +783,6 @@ let fwElement = "fw"+fwVersion.replace('.','');
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
ps4fw = fwVersion;
|
ps4fw = fwVersion;
|
||||||
// Display only Compatible GoldHENs
|
|
||||||
const GoldHENsOption = {
|
|
||||||
"9.60": ["GHv2.3Fw755", "GHv2.3Fw702"],
|
|
||||||
"9.00": ["GHv2.3Fw755", "GHv2.3Fw702"],
|
|
||||||
"9.03": ["GHv2.3Fw755", "GHv2.3Fw702", "GHv2.4b18", "GHv2.4b18.2"],
|
|
||||||
"7.55": ["GHv2.4b18.4", "GHv2.4b18.2", "GHv2.4b18"],
|
|
||||||
"7.02": ["GHv2.4b18.4", "GHv2.4b18.2", "GHv2.4b18"]
|
|
||||||
};
|
|
||||||
// To remove all of them with one line in case the firmware is not listed
|
|
||||||
const allElements = [
|
|
||||||
"GHv2.3Fw755",
|
|
||||||
"GHv2.3Fw702",
|
|
||||||
"GHv2.4b18",
|
|
||||||
"GHv2.4b18.4",
|
|
||||||
"GHv2.4b18.2"
|
|
||||||
];
|
|
||||||
const idsToRemove = GoldHENsOption[ps4fw] || allElements;
|
|
||||||
|
|
||||||
idsToRemove.forEach(id => {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
if (el) el.remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
platform = 'Unknown platform';
|
platform = 'Unknown platform';
|
||||||
|
|
||||||
@@ -817,11 +792,11 @@ let fwElement = "fw"+fwVersion.replace('.','');
|
|||||||
else if (/Windows/.test(userAgent)) platform = 'Windows';
|
else if (/Windows/.test(userAgent)) platform = 'Windows';
|
||||||
else if (/Linux/.test(userAgent)) platform = 'Linux';
|
else if (/Linux/.test(userAgent)) platform = 'Linux';
|
||||||
|
|
||||||
document.getElementById('PS4FW').style.color = 'red';
|
// document.getElementById('PS4FW').style.color = 'red';
|
||||||
elementsToHide.forEach(id => {
|
// elementsToHide.forEach(id => {
|
||||||
const el = document.getElementById(id);
|
// const el = document.getElementById(id);
|
||||||
if (el) el.style.display = 'none';
|
// if (el) el.style.display = 'none';
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -833,7 +808,6 @@ function loadSettings() {
|
|||||||
loadLanguage();
|
loadLanguage();
|
||||||
applyLanguage(currentLanguage);
|
applyLanguage(currentLanguage);
|
||||||
renderPayloads();
|
renderPayloads();
|
||||||
loadAutoJb();
|
|
||||||
loadGoldHENVer();
|
loadGoldHENVer();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
alert("Error in loadSettings: " + e.message);
|
alert("Error in loadSettings: " + e.message);
|
||||||
|
|||||||
11
index.html
11
index.html
@@ -21,7 +21,8 @@
|
|||||||
<button onclick="aboutPopup()" id="about-btn"
|
<button onclick="aboutPopup()" id="about-btn"
|
||||||
class="p-2 rounded-lg bg-gray-800 hover:bg-gray-700 transition-colors text-white/80 hover:text-white"
|
class="p-2 rounded-lg bg-gray-800 hover:bg-gray-700 transition-colors text-white/80 hover:text-white"
|
||||||
title="About">
|
title="About">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="25" fill="currentColor" viewBox="0 0 512 512"><title>ionicons-v5-f</title><path d="M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm64,226H200V332h44V244H212V212h64V332h44Z"/></svg> </button>
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="25" fill="currentColor" viewBox="0 0 512 512"><path d="M256,56C145.72,56,56,145.72,56,256s89.72,200,200,200,200-89.72,200-200S366.28,56,256,56Zm0,82a26,26,0,1,1-26,26A26,26,0,0,1,256,138Zm64,226H200V332h44V244H212V212h64V332h44Z"/></svg>
|
||||||
|
</button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<!-- PS Button -->
|
<!-- PS Button -->
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
<div id="ps-logo-container"
|
<div id="ps-logo-container"
|
||||||
class="relative group cursor-pointer flex flex-col items-center justify-center p-8 rounded-full bg-white/5 hover:bg-white/10 transition-all duration-300 transform hover:scale-105">
|
class="relative group cursor-pointer flex flex-col items-center justify-center p-8 rounded-full bg-white/5 hover:bg-white/10 transition-all duration-300 transform hover:scale-105">
|
||||||
<svg id="ps-logo" class="w-32 h-32 transition-all duration-500 ease-in-out" viewBox="0 0 32 32"
|
<svg id="ps-logo" class="w-32 h-32 transition-all duration-500 ease-in-out" viewBox="0 0 32 32"
|
||||||
fill="rgb(59 130 246)" xmlns="http://www.w3.org/2000/svg">
|
fill="#3B82F6" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g id="SVGRepo_iconCarrier">
|
<g id="SVGRepo_iconCarrier">
|
||||||
<path
|
<path
|
||||||
d="M0.69116 21.9548C-0.506476 22.7935 -0.284724 24.2384 2.44769 25.1419C5.18011 26.0455 8.35603 26.2323 11.1505 25.729C11.0707 25.729 11.3102 25.729 11.1505 25.729V22.8774L8.43588 23.8C7.39792 24.1355 6.35997 24.2194 5.32202 23.9677C4.5236 23.7161 4.68328 23.2129 5.64139 22.7935L11.1505 20.7806V17.6774L3.48565 20.4452C2.52754 20.7806 1.56943 21.2839 0.69116 21.9548ZM19.2146 9.37419V17.5097C22.4881 19.1871 25.0431 17.5097 25.0431 13.1484C25.0431 8.70323 23.5261 6.69032 19.1348 5.09677C16.8193 4.25806 14.4241 3.50323 12.0288 3V27.2387L17.6178 29V8.61935C17.6178 7.69677 17.6178 7.02581 18.2565 7.27742C19.1348 7.52903 19.2146 8.45161 19.2146 9.37419ZM29.5941 20.0258C27.2787 19.1871 24.8036 18.8516 22.4083 19.1032C21.0779 19.1906 19.8294 19.5869 18.5759 20.0258V23.2968L23.7656 21.2839C24.8036 20.9484 25.8415 20.8645 26.8795 21.1161C27.6779 21.3677 27.5182 21.871 26.5601 22.2903L18.5759 25.3935V28.5806L29.5941 24.3032C30.3925 23.9677 31.1111 23.5484 31.7499 22.8774C32.3088 22.0387 32.0692 20.8645 29.5941 20.0258Z">
|
d="M0.69116 21.9548C-0.506476 22.7935 -0.284724 24.2384 2.44769 25.1419C5.18011 26.0455 8.35603 26.2323 11.1505 25.729C11.0707 25.729 11.3102 25.729 11.1505 25.729V22.8774L8.43588 23.8C7.39792 24.1355 6.35997 24.2194 5.32202 23.9677C4.5236 23.7161 4.68328 23.2129 5.64139 22.7935L11.1505 20.7806V17.6774L3.48565 20.4452C2.52754 20.7806 1.56943 21.2839 0.69116 21.9548ZM19.2146 9.37419V17.5097C22.4881 19.1871 25.0431 17.5097 25.0431 13.1484C25.0431 8.70323 23.5261 6.69032 19.1348 5.09677C16.8193 4.25806 14.4241 3.50323 12.0288 3V27.2387L17.6178 29V8.61935C17.6178 7.69677 17.6178 7.02581 18.2565 7.27742C19.1348 7.52903 19.2146 8.45161 19.2146 9.37419ZM29.5941 20.0258C27.2787 19.1871 24.8036 18.8516 22.4083 19.1032C21.0779 19.1906 19.8294 19.5869 18.5759 20.0258V23.2968L23.7656 21.2839C24.8036 20.9484 25.8415 20.8645 26.8795 21.1161C27.6779 21.3677 27.5182 21.871 26.5601 22.2903L18.5759 25.3935V28.5806L29.5941 24.3032C30.3925 23.9677 31.1111 23.5484 31.7499 22.8774C32.3088 22.0387 32.0692 20.8645 29.5941 20.0258Z">
|
||||||
@@ -209,12 +210,6 @@
|
|||||||
<div id="settings-popup"
|
<div id="settings-popup"
|
||||||
class="bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-lg max-h-[90vh] overflow-y-auto">
|
class="bg-gray-800 p-6 rounded-lg shadow-xl w-full max-w-lg max-h-[90vh] overflow-y-auto">
|
||||||
<h2 class="text-2xl font-bold mb-4">PSFree settings</h2>
|
<h2 class="text-2xl font-bold mb-4">PSFree settings</h2>
|
||||||
|
|
||||||
<label id="autojbchkb" class="flex items-center text-white/80 mt-4 mb-2">
|
|
||||||
<input type="checkbox" id="autoJbBox" class="ml-2"/>
|
|
||||||
<p id="agtext">Jailbreak automatically</p>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<!-- Language chooser -->
|
<!-- Language chooser -->
|
||||||
<div id="chooselang" class="mb-6">
|
<div id="chooselang" class="mb-6">
|
||||||
<h3 class="text-lg font-semibold mb-2">Language</h3>
|
<h3 class="text-lg font-semibold mb-2">Language</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user