mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Push custom-options
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<title>Cultivation</title>
|
||||
<script src="%PUBLIC_URL%/theme-engine.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
|
||||
14
public/theme-engine.js
Normal file
14
public/theme-engine.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Passes a message through to the React backend.
|
||||
* @param type The message type.
|
||||
* @param data The message data.
|
||||
*/
|
||||
function passthrough(type, data) {
|
||||
document.dispatchEvent(new CustomEvent('domMessage', {
|
||||
type, msg: data
|
||||
}))
|
||||
}
|
||||
|
||||
function setConfigValue(key, value) {
|
||||
passthrough('updateConfig', {setting: key, value})
|
||||
}
|
||||
Reference in New Issue
Block a user