Push custom-options

This commit is contained in:
KingRainbow44
2022-07-06 01:38:34 -04:00
parent a3e1898d82
commit c1a41bec65
13 changed files with 265 additions and 17 deletions

14
public/theme-engine.js Normal file
View 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})
}