mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-18 13:22:06 +00:00
fix: 341
This commit is contained in:
parent
11651cd3b4
commit
2328c2a832
2 changed files with 9 additions and 3 deletions
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
let canScroll = true
|
||||
|
||||
async function loadTillFull () {
|
||||
async function loadTillFull (_key) {
|
||||
if (!container) return
|
||||
const cachedKey = $key
|
||||
canScroll = false
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@
|
|||
import { defaults } from '@/../common/util.js'
|
||||
export let alToken = localStorage.getItem('ALtoken') || null
|
||||
|
||||
export const set = { ...defaults, ...(JSON.parse(localStorage.getItem('settings')) || {}) }
|
||||
let storedSettings = { ...defaults }
|
||||
|
||||
try {
|
||||
storedSettings = JSON.parse(localStorage.getItem('settings'))
|
||||
} catch (e) {}
|
||||
|
||||
export const set = { ...defaults, ...storedSettings }
|
||||
if (set.enableDoH) window.IPC.emit('doh', set.doHURL)
|
||||
window.addEventListener('paste', ({ clipboardData }) => {
|
||||
if (clipboardData.items?.[0]) {
|
||||
|
|
@ -110,7 +116,7 @@
|
|||
let settings = set
|
||||
$: saveSettings(settings)
|
||||
$: window.IPC.emit('discord_status', settings.showDetailsInRPC)
|
||||
function saveSettings () {
|
||||
function saveSettings (settings) {
|
||||
localStorage.setItem('settings', JSON.stringify(settings))
|
||||
}
|
||||
function restoreSettings () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue