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: remove unnecessary operation
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { linkRedirect } from './main.js';
|
||||
|
||||
const telegramLink = document.getElementById('telegram');
|
||||
const githubLink = document.getElementById('github');
|
||||
|
||||
// Function to show about overlay
|
||||
document.getElementById("about").addEventListener("click", () => {
|
||||
const aboutOverlay = document.getElementById('about-overlay');
|
||||
@@ -33,9 +30,9 @@ document.getElementById("about").addEventListener("click", () => {
|
||||
});
|
||||
|
||||
// Event listener for link redirect
|
||||
telegramLink.addEventListener('click', function() {
|
||||
document.getElementById('telegram').addEventListener('click', function() {
|
||||
linkRedirect('https://t.me/kowchannel');
|
||||
});
|
||||
githubLink.addEventListener('click', function() {
|
||||
document.getElementById('github').addEventListener('click', function() {
|
||||
linkRedirect('https://github.com/KOWX712/Tricky-Addon-Update-Target-List');
|
||||
});
|
||||
@@ -10,7 +10,7 @@ let availableLanguages = ['en-US'];
|
||||
* Detect user's default language
|
||||
* @returns {Promise<string>} - Detected language code
|
||||
*/
|
||||
export async function detectUserLanguage() {
|
||||
async function detectUserLanguage() {
|
||||
const userLang = navigator.language || navigator.userLanguage;
|
||||
const langCode = userLang.split('-')[0];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { appListContainer, fetchAppList } from './applist.js';
|
||||
import { loadTranslations, setupLanguageMenu, translations } from './language.js';
|
||||
import { aospkb, setupSystemAppMenu } from './menu_option.js';
|
||||
import { setupSystemAppMenu } from './menu_option.js';
|
||||
import { searchMenuContainer, searchInput, clearBtn, setupMenuToggle } from './search_menu.js';
|
||||
import { updateCheck } from './update.js';
|
||||
import { securityPatch } from './security_patch.js';
|
||||
@@ -44,7 +44,6 @@ async function getModuleVersion() {
|
||||
moduleVersion.textContent = version;
|
||||
} catch (error) {
|
||||
console.error("Failed to read version from module.prop:", error);
|
||||
updateVersion("Error");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +342,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
floatingBtn.style.display = 'block';
|
||||
hideFloatingBtn(false);
|
||||
document.getElementById("refresh").addEventListener("click", refreshAppList);
|
||||
document.getElementById("aospkb").addEventListener("click", aospkb);
|
||||
document.querySelector('.uninstall-container').classList.remove('hidden-uninstall');
|
||||
});
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ export async function setupSystemAppMenu() {
|
||||
currentSystemAppListContent.innerHTML = "";
|
||||
try {
|
||||
const systemAppList = await execCommand(`[ -f "/data/adb/tricky_store/system_app" ] && cat "/data/adb/tricky_store/system_app" | sed '/^$/d' || echo "false"`);
|
||||
if (systemAppList.includes("false")) {
|
||||
if (systemAppList.trim() === 'false' || systemAppList.trim() === '') {
|
||||
currentSystemAppList.style.display = "none";
|
||||
} else {
|
||||
systemAppList.split("\n").forEach(app => {
|
||||
@@ -191,7 +191,7 @@ async function setKeybox(content) {
|
||||
}
|
||||
|
||||
// Function to replace aosp kb
|
||||
export async function aospkb() {
|
||||
document.getElementById("aospkb").addEventListener("click", async () => {
|
||||
const source = await execCommand(`xxd -r -p ${basePath}/common/.default | base64 -d`);
|
||||
const result = await setKeybox(source);
|
||||
if (result) {
|
||||
@@ -200,7 +200,7 @@ export async function aospkb() {
|
||||
} else {
|
||||
showPrompt("prompt.key_set_error", false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Function to replace valid kb
|
||||
document.getElementById("validkb").addEventListener("click", async () => {
|
||||
|
||||
Reference in New Issue
Block a user