mirror of
https://github.com/mue/mue.git
synced 2026-07-07 14:17:09 +02:00
fix: console error and codacy
This commit is contained in:
@@ -25,7 +25,7 @@ export function offlineBackground() {
|
||||
localStorage.setItem('currentBackground', JSON.stringify(object));
|
||||
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
export function gradientStyleBuilder({ type, angle, gradient }) {
|
||||
// Note: Append the gradient for additional browser support.
|
||||
@@ -35,5 +35,5 @@ export function gradientStyleBuilder({ type, angle, gradient }) {
|
||||
return {
|
||||
type: 'colour',
|
||||
style: `background:${gradient[0]?.colour};${grad}`
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,4 +17,4 @@ export function nth(d) {
|
||||
|
||||
export function convertTimezone(date, tz) {
|
||||
return new Date((typeof date === 'string' ? new Date(date) : date).toLocaleString('en-US', { timeZone: tz }));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import EventBus from './eventbus';
|
||||
export function urlParser(input) {
|
||||
const urlPattern = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_+.~#?&//=]*)/;
|
||||
return input.replace(urlPattern, '<a href="$&" target="_blank">$&</a>');
|
||||
};
|
||||
}
|
||||
|
||||
export function uninstall(type, name) {
|
||||
switch (type) {
|
||||
|
||||
@@ -144,7 +144,7 @@ export function loadSettings(hotreload) {
|
||||
██ Feedback: hello@muetab.com ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
`);
|
||||
};
|
||||
}
|
||||
|
||||
// in a nutshell, this function saves all of the current settings, resets them, sets the defaults and then overrides
|
||||
// the new settings with the old saved messages where they exist
|
||||
|
||||
@@ -25,7 +25,7 @@ export function exportSettings() {
|
||||
});
|
||||
saveFile(settings, 'mue-settings.json');
|
||||
window.stats.postEvent('tab', 'Settings exported');
|
||||
};
|
||||
}
|
||||
|
||||
export function importSettings(e) {
|
||||
const content = JSON.parse(e.target.result);
|
||||
|
||||
Reference in New Issue
Block a user