FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
FluentRead/userscript/settings.ts at main · FluentRead/FluentRead · GitHub
FluentRead
/
FluentRead
Public
Notifications
You must be signed in to change notification settings
Fork
424
Star
8.2k
Code
Issues
12
Pull requests
3
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
FluentRead
/
userscript
/
settings.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (25 loc) · 1007 Bytes
Breadcrumbs
FluentRead
/
userscript
/
settings.ts
Copy path
File metadata and controls
28 lines (25 loc) · 1007 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import
SettingsPanel
from
'./SettingsPanel.vue'
;
import
{
createVueShadowUi
,
type
VueShadowMount
}
from
'@/src/platform/shadow-ui'
;
import
type
{
ShadowRootContentScriptUi
}
from
'wxt/utils/content-script-ui/shadow-root'
;
let
settingsUi
:
ShadowRootContentScriptUi
<
VueShadowMount
>
|
null
=
null
;
export
async
function
openUserscriptSettings
(
ctx
:
unknown
,
_section
?:
string
)
:
Promise
<
void
>
{
if
(
settingsUi
)
return
;
let
ui
:
ShadowRootContentScriptUi
<
VueShadowMount
>
|
null
=
null
;
const
close
=
(
)
=>
{
ui
?.
remove
(
)
;
if
(
settingsUi
===
ui
)
settingsUi
=
null
;
}
;
ui
=
await
createVueShadowUi
(
ctx
as
never
,
{
name
:
'fluent-read-userscript-settings-ui'
,
hostId
:
'fluent-read-userscript-settings-container'
,
component
:
SettingsPanel
,
props
:
{
onClose
:
close
}
,
zIndex
:
2_147_483_647
,
mode
:
'closed'
,
}
)
;
settingsUi
=
ui
;
}
export
function
closeUserscriptSettings
(
)
:
void
{
settingsUi
?.
remove
(
)
;
settingsUi
=
null
;
}
Back
|
FazBrowse Home
|
New Git URL