From cde142de7f0061cfeae1aeaad94ddca8664eca15 Mon Sep 17 00:00:00 2001 From: RainyXeon Date: Sat, 20 Jul 2024 17:23:28 +0700 Subject: [PATCH] fix: open link on webui instead of browser --- webroot/index.html | 13 ++++--------- webroot/js/main.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/webroot/index.html b/webroot/index.html index b25b62f..716cad8 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -6,11 +6,6 @@ - @@ -220,7 +215,7 @@
Module Developer
-
+
The PerformanC Organization
@@ -228,11 +223,11 @@
Original Module Developer
-
+
Nullptr
,
-
+
5ec1cff
@@ -240,7 +235,7 @@
WebUI Developer
-
+
RainyXeon
diff --git a/webroot/js/main.js b/webroot/js/main.js index f3fda1e..2145db3 100644 --- a/webroot/js/main.js +++ b/webroot/js/main.js @@ -167,4 +167,14 @@ export function setErrorData(errorLog) { } else { setError('find', `Error while finding zygisk modules (${findModulesCmd.errno}): ${findModulesCmd.stderr}`) } -})().catch((err) => setError('WebUI', err.stack ? err.stack : err.message)) \ No newline at end of file +})().catch((err) => setError('WebUI', err.stack ? err.stack : err.message)) + +document.addEventListener('click', async (event) => { + const getLink = event.target.getAttribute('credit-link') + if (!getLink || typeof getLink !== 'string') return; + + const ptrace64Cmd = await exec(`am start -a android.intent.action.VIEW -d https://${getLink}`).catch(() => { + return window.open(`https://${getLink}`, "_blank", 'toolbar=0,location=0,menubar=0') + }) + if (ptrace64Cmd.errno !== 0) return window.open(`https://${getLink}`, "_blank", 'toolbar=0,location=0,menubar=0') +}, false) \ No newline at end of file