Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layout/_partials/post/wechat-subscriber.swig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center">
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center;">
<img id="wechat_subscriber_qcode" src="{{ url_for(theme.wechat_subscriber.qcode) }}" alt="{{ author }} wechat" style="width: 200px; max-width: 100%;"/>
<div>{{ theme.wechat_subscriber.description }}</div>
</div>
4 changes: 2 additions & 2 deletions layout/_partials/search/index.swig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if theme.algolia_search.enable %}
{% include 'algolia-search.swig' %}
{% elseif theme.swiftype_key %}
{% elif theme.swiftype_key %}
{% include 'swiftype.swig' %}
{% elseif theme.local_search.enable %}
{% elif theme.local_search.enable %}
{% include 'localsearch.swig' %}
{% endif %}
6 changes: 3 additions & 3 deletions layout/_third-party/analytics/lean-analytics.swig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
})
{% endif %}
.fail(function ({ responseJSON }) {
console.log(`Failed to save Visitor num, with error message: ${responseJSON.error}`);
console.log('Failed to save Visitor num, with error message: ' + responseJSON.error);
})
} else {
{% if theme.leancloud_visitors.security %}
Expand All @@ -43,7 +43,7 @@
}
})
.fail(function ({ responseJSON }) {
console.log(`LeanCloud Counter Error: ${responseJSON.code} ${responseJSON.error}`);
console.log('LeanCloud Counter Error: ' + responseJSON.code + ' ' + responseJSON.error);
});
}
{% else %}
Expand Down Expand Up @@ -82,7 +82,7 @@
}
})
.fail(function ({ responseJSON }) {
console.log(`LeanCloud Counter Error: ${responseJSON.code} ${responseJSON.error}`);
console.log('LeanCloud Counter Error: ' + responseJSON.code + ' ' + responseJSON.error);
});
}
{% endif %}
Expand Down
7 changes: 1 addition & 6 deletions layout/_third-party/baidu-push.swig
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hexo.extend.filter.register('after_post_render', function(data) {
// If title atribute filled, set it as title; if not, set url as title.
var title = $(this).attr('title') || href;

var encoded = new Buffer(href).toString('base64');
var encoded = Buffer.from(href).toString('base64');

$(this).replaceWith(function() {
return $(`<span class="exturl" data-url="${encoded}" title="${title}">${$(this).html()}<i class="fa fa-external-link"></i></span>`);
Expand All @@ -42,4 +42,4 @@ hexo.extend.filter.register('after_post_render', function(data) {
});

data.content = $.html();
});
}, 0);
2 changes: 1 addition & 1 deletion scripts/helpers/next-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ hexo.extend.helper.register('next_url', function(path, text, options) {
if (theme.exturl && data.protocol && data.hostname !== siteHost) {
tag = 'span';
exturl = 'exturl';
var encoded = new Buffer(path).toString('base64');
var encoded = Buffer.from(path).toString('base64');
attrs = {
class : exturl,
'data-url': encoded
Expand Down