3131
3232// config options
3333const customPageFooterOptions = {
34- debug : false , // for debugging
34+ debug : false , // for debugging
3535
36- showPoweredBy : true , // should show powered by docsify at right
37- copyrightYear : '' , // show copyright year, default current year.
36+ showPoweredBy : true , // should show powered by docsify at right
37+ copyrightYear : '' , // show copyright year, default current year.
3838 showCopyright : true , // set to false to hide default copyright
3939 copyright : undefined , // set this to html string to use custom copyrihgt section
4040 copyrightOwnerName : '' , // copyright owner name
@@ -51,59 +51,59 @@ function buildFooter() {
5151 var footer = '' ;
5252
5353 // PoweredBy secion
54- if ( customPageFooterOptions . showPoweredBy ) {
54+ if ( customPageFooterOptions . showPoweredBy ) {
5555 footer += '<span class="powered-by">Powered by <a href="https://github.com/docsifyjs/docsify" target="_blank">docsify</a>.</span>' ;
5656 }
5757
5858 // Copyright section
59- if ( customPageFooterOptions . showCopyright && ! customPageFooterOptions . copyright ) {
59+ if ( customPageFooterOptions . showCopyright && ! customPageFooterOptions . copyright ) {
6060 footer += '<span class="copyright">© ' ;
6161
6262 // year
6363 footer += ( customPageFooterOptions . copyrightYear ) ? customPageFooterOptions . copyrightYear : new Date ( ) . getFullYear ( ) ;
6464
6565 // owner
66- if ( ! customPageFooterOptions . copyrightOwnerLink ) {
66+ if ( ! customPageFooterOptions . copyrightOwnerLink ) {
6767 footer += customPageFooterOptions . copyrightOwnerName + '.' ;
68- } else {
68+ } else {
6969 footer += '<a href="' + customPageFooterOptions . copyrightOwnerLink + '" target="_blank">' + customPageFooterOptions . copyrightOwnerName + '</a>.' ;
7070 }
7171
7272 // Copyright Extra
73- if ( customPageFooterOptions . copyrightExtra ) {
73+ if ( customPageFooterOptions . copyrightExtra ) {
7474 footer += '<div class="copyright-extra">' ;
7575 footer += customPageFooterOptions . copyrightExtra ;
7676 footer += '</div>'
7777 }
7878
7979 footer += '</span>'
80- } else {
80+ } else {
8181 footer += customPageFooterOptions . copyright ;
8282 }
8383
8484
8585 var footer = '<footer id="customFooter">' + footer + '</footer>' ;
8686
87- if ( customPageFooterOptions . useLocalStorage ) localStorage . setItem ( _storageKeyFooter , footer ) ;
87+ if ( customPageFooterOptions . useLocalStorage ) localStorage . setItem ( _storageKeyFooter , footer ) ;
8888
8989 return footer ;
9090}
9191
9292// main function
93- function customPageFooter ( hook , vm ) {
93+ function customPageFooter ( hook , vm ) {
9494
95- // before hook
96- // hook.beforeEach( function( content ) {
95+ // before hook
96+ // hook.beforeEach( function( content ) {
9797 // });
9898
9999 // after hook
100- hook . doneEach ( function ( ) {
100+ hook . doneEach ( function ( ) {
101101 var _footer = document . getElementById ( 'customFooter' ) ;
102102 debug ( "_footer" ) ; debug ( _footer ) ;
103103
104- if ( ! _footer ) {
104+ if ( ! _footer ) {
105105 var node = document . getElementById ( 'main' ) . parentNode ;
106- if ( ! node ) {
106+ if ( ! node ) {
107107 error ( 'parent node not found!' ) ;
108108 return ;
109109 }
@@ -112,7 +112,7 @@ function customPageFooter( hook, vm ) {
112112
113113 var footer = undefined ;
114114
115- if ( customPageFooterOptions . useLocalStorage ) {
115+ if ( customPageFooterOptions . useLocalStorage ) {
116116 footer = localStorage . getItem ( _storageKeyFooter ) ;
117117 debug ( "footer from ls -> " + footer ) ;
118118 }
@@ -123,23 +123,23 @@ function customPageFooter( hook, vm ) {
123123 } ) ;
124124}
125125
126- function debug ( msg ) {
127- if ( customPageFooterOptions . debug ) console . log ( '[customPageFooter] log: ' + msg ) ;
126+ function debug ( msg ) {
127+ if ( customPageFooterOptions . debug ) console . log ( '[customPageFooter] log: ' + msg ) ;
128128}
129129
130- function error ( msg ) {
131- if ( customPageFooterOptions . debug ) console . error ( '[customPageFooter] err: ' + msg ) ;
130+ function error ( msg ) {
131+ if ( customPageFooterOptions . debug ) console . error ( '[customPageFooter] err: ' + msg ) ;
132132}
133133
134134
135135// find customPageFooter plugin options
136136window . $docsify . customPageFooter = Object . assign (
137- customPageFooterOptions ,
138- window . $docsify . customPageFooter ,
137+ customPageFooterOptions ,
138+ window . $docsify . customPageFooter ,
139139) ;
140140
141141// Set docsify plugin
142142window . $docsify . plugins = [ ] . concat (
143- customPageFooter ,
144- window . $docsify . plugins ,
145- ) ;
143+ customPageFooter ,
144+ window . $docsify . plugins ,
145+ ) ;
0 commit comments