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
misc: drop MMRL permission request on new version of MMRL
- drop support for MMRL version < 33412
This commit is contained in:
@@ -246,15 +246,9 @@
|
||||
<!-- MMRL Permission Request Overlay -->
|
||||
<div id="permission-popup" class="permission-popup overlay">
|
||||
<div class="permission-content">
|
||||
<h2 id="permission-title">Please allow JavaScript API in MMRL settings</h2>
|
||||
<h2 id="permission-title">Please update MMRL to continue</h2>
|
||||
<div class="permission-steps">
|
||||
<ol>
|
||||
<li>Settings</li>
|
||||
<li>Security</li>
|
||||
<li>Allow JavaScript API</li>
|
||||
<li>Tricky Store</li>
|
||||
<li>Enable "Allow Advanced KernelSU API"</li>
|
||||
</ol>
|
||||
<p>Minimun MMRL version: v33412</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,6 @@ const ADDITIONAL_APPS = [ "android", "com.google.android.gms", "io.github.vvb206
|
||||
// Variables
|
||||
let e = 0;
|
||||
let isRefreshing = false;
|
||||
let MMRL_API = true;
|
||||
|
||||
// Function to set basePath
|
||||
async function getBasePath() {
|
||||
@@ -214,21 +213,20 @@ async function checkMMRL() {
|
||||
console.error("Error setting status bars theme:", error)
|
||||
}
|
||||
|
||||
// Request API permission, supported version: 33045+
|
||||
// Check MMRL version
|
||||
try {
|
||||
$tricky_store.requestAdvancedKernelSUAPI();
|
||||
const mmrlJson = $tricky_store.getMmrl();
|
||||
const mmrlData = JSON.parse(mmrlJson);
|
||||
if (mmrlData.versionCode < 33412) {
|
||||
throw new Error('MMRL version is less than 33412');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error requesting API:", error);
|
||||
}
|
||||
|
||||
// Check permissions
|
||||
try {
|
||||
await execCommand('ls /data/adb/modules');
|
||||
MMRL_API = true;
|
||||
} catch (error) {
|
||||
console.error('Permission check failed:', error);
|
||||
console.error('MMRL version check failed:', error);
|
||||
$tricky_store.requestAdvancedKernelSUAPI(); // Just to ensure linkRedirect work
|
||||
permissionPopup.style.display = 'flex';
|
||||
MMRL_API = false;
|
||||
setTimeout(() => {
|
||||
linkRedirect('https://github.com/MMRLApp/MMRL/releases/latest');
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,9 +324,8 @@ window.addEventListener('scroll', () => {
|
||||
// Initial load
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
await loadTranslations();
|
||||
await checkMMRL();
|
||||
if (!MMRL_API) return;
|
||||
await getBasePath();
|
||||
checkMMRL();
|
||||
hideFloatingBtn();
|
||||
getModuleVersion();
|
||||
setupMenuToggle();
|
||||
|
||||
@@ -262,14 +262,6 @@ body {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.permission-steps ol {
|
||||
padding: 0 25px;
|
||||
}
|
||||
|
||||
.permission-steps li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.ripple-element {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user