mirror of
https://github.com/mue/mue.git
synced 2026-07-10 22:14:39 +02:00
- Added BookmarkService for managing bookmark permissions, fetching bookmarks, and syncing with quicklinks. - Introduced IconService for handling icon retrieval and custom uploads. - Created utility functions for reading and writing quicklinks and groups to localStorage. - Implemented migration logic for transitioning quicklinks data to a new format. - Added SmartIcon component for displaying icons with fallback options. - Developed AddModal styles and structure for adding links. - Enhanced settings loading to support dynamic font loading from Google Fonts. - Refactored isValidUrl function for improved readability. - Cleaned up uninstall logic for photo packs in marketplace.
26 lines
1023 B
JavaScript
26 lines
1023 B
JavaScript
function show(enabled, useSettingsInsteadOfPreferences) {
|
|
if (useSettingsInsteadOfPreferences) {
|
|
document.getElementsByClassName('state-on')[0].innerText =
|
|
'Extension is enabled and ready to use!';
|
|
document.getElementsByClassName('state-off')[0].innerText =
|
|
'Extension is disabled. Enable it in Safari Settings.';
|
|
document.getElementsByClassName('state-unknown')[0].innerText =
|
|
'Enable Mue in Safari Settings to get started.';
|
|
document.getElementsByClassName('open-preferences')[0].innerText = 'Open Safari Settings';
|
|
}
|
|
|
|
if (typeof enabled === 'boolean') {
|
|
document.body.classList.toggle(`state-on`, enabled);
|
|
document.body.classList.toggle(`state-off`, !enabled);
|
|
} else {
|
|
document.body.classList.remove(`state-on`);
|
|
document.body.classList.remove(`state-off`);
|
|
}
|
|
}
|
|
|
|
function openPreferences() {
|
|
webkit.messageHandlers.controller.postMessage('open-preferences');
|
|
}
|
|
|
|
document.querySelector('button.open-preferences').addEventListener('click', openPreferences);
|