You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
display security patch option on tricky store v1.2.1+ only
This commit is contained in:
@@ -69,6 +69,26 @@ async function refreshAppList() {
|
|||||||
isRefreshing = false;
|
isRefreshing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function to check tricky store version
|
||||||
|
async function checkTrickyStoreVersion() {
|
||||||
|
const securityPatchElement = document.getElementById('security-patch');
|
||||||
|
try {
|
||||||
|
const version = await execCommand(`
|
||||||
|
TS_version=$(grep "versionCode=" "/data/adb/modules/tricky_store/module.prop" | cut -d'=' -f2)
|
||||||
|
[ "$TS_version" -ge 158 ] || echo "NO"
|
||||||
|
`);
|
||||||
|
if (version.trim() !== "NO") {
|
||||||
|
console.log("Tricky Store version is 158 or higher, displaying element.");
|
||||||
|
securityPatchElement.style.display = "flex";
|
||||||
|
} else {
|
||||||
|
console.log("Tricky Store version is below 158, leaving security patch element hidden.");
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
toast("Failed to check Tricky Store version!");
|
||||||
|
console.error("Error while checking Tricky Store version:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Function to check if Magisk
|
// Function to check if Magisk
|
||||||
async function checkMagisk() {
|
async function checkMagisk() {
|
||||||
const selectDenylistElement = document.getElementById('select-denylist');
|
const selectDenylistElement = document.getElementById('select-denylist');
|
||||||
@@ -305,6 +325,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
setupLanguageMenu();
|
setupLanguageMenu();
|
||||||
await fetchAppList();
|
await fetchAppList();
|
||||||
applyRippleEffect();
|
applyRippleEffect();
|
||||||
|
checkTrickyStoreVersion();
|
||||||
checkMagisk();
|
checkMagisk();
|
||||||
updateCheck();
|
updateCheck();
|
||||||
securityPatch();
|
securityPatch();
|
||||||
|
|||||||
@@ -114,7 +114,8 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#select-denylist {
|
#select-denylist,
|
||||||
|
#security-patch {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.advanced-toggle {
|
.advanced-toggle {
|
||||||
|
|||||||
Reference in New Issue
Block a user