fallbackwidth
and fallbackheight
are empty when you run the config in the browser
Note
The current version is messy.
(function() { | |
// Prevent duplicate injection | |
if (document.getElementById('homescreen-shortcut-container')) return; | |
// i18n fallback | |
const i18n = { | |
'control_panel_create_shortcut': 'Add to homescreen', | |
'control_panel_exists_shortcut': 'Shortcut already exists', | |
'control_panel_shortcut_created': 'Added to homescreen!' | |
}; |
class JavaObject { | |
static { | |
this.reflect = global.require("wx:reflect"); | |
this.proxyHandlers = new Map(); | |
this.nextProxyId = 0; | |
} | |
constructor(className, args = []) { | |
if (className) { | |
this.classId = JavaObject.getClass(className); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Text File Viewer</title> | |
<style> | |
body { | |
font-family: sans-serif; |
class CustomWXEvent extends CustomEvent { | |
get wxOrigin() { | |
return this._wxOrigin | |
} | |
set wxOrigin(value) { | |
this._wxOrigin = value | |
} | |
constructor(type, detail) { | |
super(type, { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta | |
name="viewport" | |
content="width=device-width, initial-scale=1.0, user-scalable=no" | |
/> | |
<title>Snake Game</title> | |
<!-- Window Safe Area Insets --> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>MMRL Audio Player</title> | |
<!-- Window Safe Area Insets --> | |
<link rel="stylesheet" type="text/css" href="https://mui.kernelsu.org/internal/insets.css" /> | |
<!-- App Theme which the user has currently selected --> | |
<link rel="stylesheet" type="text/css" href="https://mui.kernelsu.org/internal/colors.css" /> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>App List</title> | |
<link rel="stylesheet" href="https://mui.kernelsu.org/internal/colors.css" /> | |
<style> | |
body { | |
font-family: sans-serif; |
@import url("https://mui.kernelsu.org/mmrl/colors.css"); | |
:root { | |
/* Background colors */ | |
--bg-primary: var(--background); | |
--bg-secondary: var(--tonalSurface); | |
--bg-input: var(--surfaceBright); | |
/* Text colors */ | |
--text-primary: var(--onSurface); |
import React from "react"; | |
import { Page, Toolbar, BottomToolbar, Ansi } from "@mmrl/ui"; | |
import { ConfigProvider } from "@mmrl/providers"; | |
import { | |
useConfig, | |
useActivity, | |
useNativeStorage, | |
useTheme | |
} from "@mmrl/hooks"; | |
import { Add, Remove, Save } from "@mui/icons-material"; |