File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 3
3
create : function ( codefundId ) {
4
4
return function ( hook , vm ) {
5
5
hook . ready ( function ( ) {
6
- window . DocsifyCodefund . injectCodeFundContainer ( ) ;
6
+ window . DocsifyCodefund . injectCodeFundStyle ( ) ;
7
7
window . DocsifyCodefund . injectCodeFundScript ( codefundId ) ;
8
8
} )
9
+
10
+ hook . doneEach ( function ( ) {
11
+ window . DocsifyCodefund . injectCodeFundContainer ( ) ;
12
+ } )
9
13
}
10
14
} ,
11
15
25
29
script . src = "https://codefund.app/properties/" + codefundId + "/funder.js?template=docsify"
26
30
script . async = "async"
27
31
document . body . appendChild ( script )
32
+ } ,
33
+
34
+ injectCodeFundStyle ( ) {
35
+ var style = document . createElement ( 'style' ) ;
36
+ window . DocsifyCodefund . injectCodeFundContainer ( ) ;
37
+ var css = '#cf span.cf-wrapper { background-color: transparent!important } #cf a.cf-text { color: #444!important; font-weight: 400!important; font-size: 10px!important }' ;
38
+
39
+ style . type = 'text/css' ;
40
+ if ( style . styleSheet ) {
41
+ style . styleSheet . cssText = css ;
42
+ } else {
43
+ style . appendChild ( document . createTextNode ( css ) ) ;
44
+ }
45
+ document . head . appendChild ( style ) ;
28
46
}
29
47
}
30
- } ) ( window )
48
+ } ) ( window )
You can’t perform that action at this time.
0 commit comments