gitbook-plugin-local-pagefooter
Advanced tools
Comparing version 1.0.3 to 1.0.4
22
index.js
@@ -10,8 +10,8 @@ var moment = require('moment'); | ||
hooks: { | ||
'page:before': function(page) { | ||
'page:before': function (page) { | ||
var _label = 'File Modify: ', | ||
_format = 'YYYY-MM-DD HH:mm:ss', | ||
_copy = 'powered by Gitbook', | ||
_islocal = true; | ||
if(this.options.pluginsConfig['local-pagefooter']) { | ||
_format = 'YYYY-MM-DD HH:mm:ss', | ||
_copy = 'powered by Gitbook', | ||
_islocal = true; | ||
if (this.options.pluginsConfig['local-pagefooter']) { | ||
_label = this.options.pluginsConfig['local-pagefooter']['modify_label'] || _label; | ||
@@ -21,5 +21,5 @@ _format = this.options.pluginsConfig['local-pagefooter']['modify_format'] || _format; | ||
var _c = this.options.pluginsConfig['local-pagefooter']['copyright']; | ||
_copy = _c ? _c + ' all right reserved,' + _copy : _copy; | ||
_copy = _c ? '@' + _c + ' ' + _copy : _copy; | ||
} | ||
var _copy = '<span class="copyright">'+_copy+'</span>' | ||
var _copy = '<span class="copyright">' + _copy + '</span>' | ||
var str = ' \n\n<footer class="page-footer">' + _copy + | ||
@@ -35,8 +35,8 @@ '<span class="footer-modification">' + | ||
filters: { | ||
date: function(d, format) { | ||
date: function (d, format) { | ||
var _islocal = this.options.pluginsConfig['local-pagefooter']['islocal'] || _islocal; | ||
var time = ''; | ||
if (_islocal){ | ||
if (_islocal) { | ||
time = moment(d).local().format(format) | ||
}else{ | ||
} else { | ||
time = moment(d).format(format) | ||
@@ -47,2 +47,2 @@ } | ||
} | ||
}; | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "name": "webkong", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14955
57