mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
暗黑模式调整
This commit is contained in:
parent
bb3888d8dc
commit
ccb9fb0f5e
@ -1,6 +1,13 @@
|
|||||||
!function () {
|
!function () {
|
||||||
|
if (utools.isDarkColors()) {
|
||||||
|
!$('#darkmode').length && $('head').append(`
|
||||||
|
<link id="darkmode" rel="stylesheet" href="assets/style/darkmode.css">
|
||||||
|
<link id="darkswal" rel="stylesheet" href="assets/plugins/sweetalert2/dark.min.css">`)
|
||||||
|
} else {
|
||||||
|
$('#darkmode').length && $('#darkmode, #darkswal').remove()
|
||||||
|
}
|
||||||
|
|
||||||
utools.onPluginEnter(async ({ code, type, payload }) => {
|
utools.onPluginEnter(async ({ code, type, payload }) => {
|
||||||
adaptDarkMode()
|
|
||||||
// oldVersionFix()
|
// oldVersionFix()
|
||||||
var handleEnter
|
var handleEnter
|
||||||
utools.onPluginOut(() => {
|
utools.onPluginOut(() => {
|
||||||
@ -224,15 +231,4 @@
|
|||||||
putDB(x, customFts[x], 'customFts');
|
putDB(x, customFts[x], 'customFts');
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兼容暗黑模式
|
|
||||||
let adaptDarkMode = () => {
|
|
||||||
if (utools.isDarkColors()) {
|
|
||||||
!$('#darkmode').length && $('head').append(`
|
|
||||||
<link id="darkmode" rel="stylesheet" href="assets/style/darkmode.css">
|
|
||||||
<link id="darkswal" rel="stylesheet" href="assets/plugins/sweetalert2/dark.min.css">`)
|
|
||||||
} else {
|
|
||||||
$('#darkmode').length && $('#darkmode, #darkswal').remove()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user