js: add moduleInfo method (#2057)

Add a `ksu.moduleInfo()` in JS.
resolves https://github.com/tiann/KernelSU/issues/1571

test module's index.html

![image](https://github.com/user-attachments/assets/39920606-452c-4b19-abca-967c25146d6a)

The test module:

[moduleInfo_test.zip](https://github.com/user-attachments/files/17001977/moduleInfo_test.zip)

test module's result:

![image](https://github.com/user-attachments/assets/9dbbd2e8-f7ea-418f-b545-66d33ce1b3ae)
This commit is contained in:
sus
2024-09-14 21:52:11 +08:00
committed by GitHub
parent 50f48a33f1
commit ac20b76eaf
6 changed files with 45 additions and 5 deletions

5
js/index.d.ts vendored
View File

@@ -37,9 +37,12 @@ declare function fullScreen(isFullScreen: boolean);
declare function toast(message: string);
declare function moduleInfo(): string;
export {
exec,
spawn,
fullScreen,
toast
toast,
moduleInfo
}