You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
fix: JS code indentation/syntax
This commit fixes the syntax and indentation of the JavaScript code to meet the organization standard.
This commit is contained in:
@@ -27,9 +27,9 @@ export async function setNewLanguage(locate, initialize) {
|
||||
}
|
||||
|
||||
export async function getTranslations(locate) {
|
||||
const translateData = await fetch(`./lang/${locate}.json`)
|
||||
.catch(() => null)
|
||||
return await translateData.json()
|
||||
const translateData = await fetch(`./lang/${locate}.json`).catch(() => { /* INFO: noop */ })
|
||||
|
||||
return translateData.json()
|
||||
}
|
||||
|
||||
/* INFO: This list is in alphabetical order. */
|
||||
|
||||
@@ -20,7 +20,7 @@ close_button.addEventListener('click', () => {
|
||||
})
|
||||
|
||||
copy_button.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(panel.innerHTML);
|
||||
navigator.clipboard.writeText(panel.innerHTML)
|
||||
})
|
||||
|
||||
function setData(mode) {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
setData('home')
|
||||
|
||||
document.getElementById('ni_home').style.display = 'flex'
|
||||
document.getElementById('nid_home').style.display = 'none'
|
||||
document.getElementById('panel_home').style.display = 'block'
|
||||
|
||||
document.querySelectorAll('[name=navbutton]').forEach((element) => {
|
||||
element.addEventListener('click', (e) => {
|
||||
const value = e.target.value
|
||||
element.addEventListener('click', (event) => {
|
||||
const value = event.target.value
|
||||
const previous = !localStorage.getItem('/cache/navbar/previous') ? setData('home') : localStorage.getItem('/cache/navbar/previous')
|
||||
if (previous === value) return;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ let sys_error = localStorage.getItem('/system/error')
|
||||
|
||||
if (!sys_error) {
|
||||
localStorage.setItem('/system/error', '')
|
||||
|
||||
sys_error = localStorage.getItem('/system/error')
|
||||
}
|
||||
|
||||
|
||||
@@ -18,5 +18,6 @@ button.addEventListener('click', () => {
|
||||
|
||||
function setData(mode) {
|
||||
localStorage.setItem('/system/theme', mode)
|
||||
|
||||
return mode
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
light_copy_icon,
|
||||
} from './lightIcon.js'
|
||||
import { setLightNav } from './lightNavbar.js'
|
||||
|
||||
const rootCss = document.querySelector(':root')
|
||||
|
||||
/* INFO: Changes the icons to match the theme */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { light_action_icon, light_home_icon, light_module_icon, light_settings_icon } from "./lightIcon.js"
|
||||
import { light_action_icon, light_home_icon, light_module_icon, light_settings_icon } from './lightIcon.js'
|
||||
|
||||
export function setLightNav() {
|
||||
document.getElementById('nid_home').innerHTML = light_home_icon()
|
||||
|
||||
Reference in New Issue
Block a user