feat: add create home screen shortcut option

This commit is contained in:
KOWX712
2025-05-09 18:07:29 +08:00
parent a198a31a15
commit 0ecd59414e
22 changed files with 82 additions and 33 deletions

View File

@@ -192,6 +192,14 @@ function checkMMRL() {
if (window.$tricky_store && Object.keys($tricky_store).length > 0) {
// Set status bars theme based on device theme
$tricky_store.setLightStatusBars(!window.matchMedia('(prefers-color-scheme: dark)').matches)
// Create home screen shortcut
const shortcutButton = document.getElementById('shortcut');
shortcutButton.style.display = 'flex';
shortcutButton.addEventListener('click', () => {
$tricky_store.createShortcut();
showPrompt("prompt.shortcut_created", true);
});
}
}