Commit d787b0c2 authored by Van's avatar Van

🎨 #12503

parent 85c3dfae
......@@ -33,7 +33,7 @@ var Util = {
div.innerHTML = decodeURIComponent(code)
return div.innerText
},
_isArticlePage: function (href) {
isArticlePage: function (href) {
var isArticle = true;
if (href.indexOf(latkeConfig.servePath + '/tags/') > -1) {
isArticle = false;
......@@ -64,9 +64,8 @@ var Util = {
/**
* 初始化 Pjax
* @param cb 除文章和自定义页面外的其他页面加载回调
* @param articelCB 文章页面加载后的回调
*/
initPjax: function (cb, articelCB) {
initPjax: function (cb) {
if ($('#pjax').length === 1) {
$.pjax({
selector: 'a',
......@@ -79,7 +78,7 @@ var Util = {
if (href.indexOf('data:image') > -1) {
return true
}
return Util._isArticlePage(href);
return false
},
callback: function () {
cb()
......@@ -94,33 +93,6 @@ var Util = {
});
return;
}
if ($('#pjaxArticle').length === 1) {
$.pjax({
selector: 'a',
container: '#pjaxArticle',
show: '',
cache: false,
storage: true,
titleSuffix: '',
filter: function(href){
if (href.indexOf('data:image') > -1) {
return true
}
return !Util._isArticlePage(href);
},
callback: function () {
articelCB();
}
});
NProgress.configure({ showSpinner: false });
$('#pjaxArticle').bind('pjax.start', function(){
NProgress.start();
});
$('#pjaxArticle').bind('pjax.end', function(){
NProgress.done();
});
return;
}
},
/**
* 按需加载 MathJax 及 flow
......
This diff is collapsed.
Subproject commit 751599e758c80c71894f03bb83b1c866aa3efdb2
Subproject commit 73c125c9f0548479585b61f90e5510a90f2ab0cb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment