You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: functional daemon action buttons
This commit adds the function that allows functional daemon action buttons.
This commit is contained in:
@@ -5,14 +5,17 @@
|
||||
<meta name="viewport" content="initial-scale=1, width=device-width" />
|
||||
<meta name="viewport" content="viewport-fit=cover" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<script src="js/theme.js" type="module"></script>
|
||||
<script src="js/restoreError.js" type="module"></script>
|
||||
<script src="js/navbar.js" type="module"></script>
|
||||
<script src="js/daemon_actions.js" type="module"></script>
|
||||
<script src="js/list/language.js" type="module"></script>
|
||||
<script src="js/switcher/fontChanger.js" type="module"></script>
|
||||
<script src="js/main.js" type="module"></script>
|
||||
<script src="js/modal/language.js" type="module"></script>
|
||||
<script src="js/modal/errorHistory.js" type="module"></script>
|
||||
|
||||
<link rel="stylesheet" href="css/fonts.css">
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
</head>
|
||||
|
||||
37
webroot/js/daemon_actions.js
Normal file
37
webroot/js/daemon_actions.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import { exec } from './kernelsu.js'
|
||||
|
||||
const daemon64_start = document.getElementById('daemon64_start_button')
|
||||
const daemon64_stop = document.getElementById('daemon64_stop_button')
|
||||
const daemon64_exit = document.getElementById('daemon64_exit_button')
|
||||
|
||||
if (daemon64_start) {
|
||||
daemon64_start.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace64 ctl start')
|
||||
})
|
||||
|
||||
daemon64_stop.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace64 ctl stop')
|
||||
})
|
||||
|
||||
daemon64_exit.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace64 ctl exit')
|
||||
})
|
||||
}
|
||||
|
||||
const daemon32_start = document.getElementById('daemon32_start_button')
|
||||
const daemon32_stop = document.getElementById('daemon32_stop_button')
|
||||
const daemon32_exit = document.getElementById('daemon32_exit_button')
|
||||
|
||||
if (daemon32_start) {
|
||||
daemon32_start.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace32 ctl start')
|
||||
})
|
||||
|
||||
daemon32_stop.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace32 ctl stop')
|
||||
})
|
||||
|
||||
daemon32_exit.addEventListener('click', () => {
|
||||
exec('/data/adb/modules/zygisksu/bin/zygisk-ptrace32 ctl exit')
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user