FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docsify/src/plugins/gitalk.js at develop · docsifyjs/docsify · GitHub
docsifyjs
/
docsify
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
5.8k
Star
31.5k
Code
Issues
62
Pull requests
29
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
docsify
/
src
/
plugins
/
gitalk.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (23 loc) · 757 Bytes
Breadcrumbs
docsify
/
src
/
plugins
/
gitalk.js
Copy path
File metadata and controls
29 lines (23 loc) · 757 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
29
const
window
=
/**
@type
{
any
} */
(
globalThis
)
;
function
install
(
hook
)
{
const
dom
=
Docsify
.
dom
;
hook
.
mounted
(
_
=>
{
const
div
=
dom
.
create
(
'div'
)
;
div
.
id
=
'gitalk-container'
;
const
main
=
dom
.
getNode
(
'#main'
)
;
div
.
style
=
`width:
${
main
.
clientWidth
}
px; margin: 0 auto 20px;`
;
dom
.
appendTo
(
dom
.
find
(
'.content'
)
,
div
)
;
}
)
;
hook
.
doneEach
(
_
=>
{
const
el
=
/**
@type
{
HTMLElement
} */
(
document
.
getElementById
(
'gitalk-container'
)
)
;
while
(
el
.
hasChildNodes
(
)
)
{
el
.
removeChild
(
/**
@type
{
Node
} */
(
el
.
firstChild
)
)
;
}
window
.
gitalk
.
render
(
'gitalk-container'
)
;
}
)
;
}
window
.
$docsify
=
window
.
$docsify
||
{
}
;
window
.
$docsify
.
plugins
=
[
install
,
...
(
window
.
$docsify
.
plugins
||
[
]
)
]
;
export
{
}
;
Back
|
FazBrowse Home
|
New Git URL