parent
0424371e4b
commit
725bc90611
|
@ -306,8 +306,8 @@ var LIlGGAttachContext = {
|
||||||
headingSelector: "h1, h2, h3, h4, h5",
|
headingSelector: "h1, h2, h3, h4, h5",
|
||||||
collapseDepth: !!PageAttr.metas.tocDepth && [0,1,2,3,4,5].includes(Number(PageAttr.metas.tocDepth)) ? Number(PageAttr.metas.tocDepth) : Poi.tocDepth,
|
collapseDepth: !!PageAttr.metas.tocDepth && [0,1,2,3,4,5].includes(Number(PageAttr.metas.tocDepth)) ? Number(PageAttr.metas.tocDepth) : Poi.tocDepth,
|
||||||
hasInnerContainers: false,
|
hasInnerContainers: false,
|
||||||
headingsOffset:
|
disableTocScrollSync: true,
|
||||||
$("#page").find(".pattern-center").length > 0 ? -500 : -230,
|
headingsOffset: $("#page").find(".pattern-center").length > 0 ? -500 : -230,
|
||||||
scrollEndCallback: function (e) {
|
scrollEndCallback: function (e) {
|
||||||
if ($(".is-active-link").length == 0) {
|
if ($(".is-active-link").length == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -1162,7 +1162,6 @@ var home = location.href,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标签云
|
// 标签云
|
||||||
if (
|
if (
|
||||||
$("#tag-wordcloud").length > 0 &&
|
$("#tag-wordcloud").length > 0 &&
|
||||||
|
@ -1583,10 +1582,15 @@ if (
|
||||||
) {
|
) {
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"hashchange",
|
"hashchange",
|
||||||
function () {
|
function (e) {
|
||||||
var id = location.hash.substring(1),
|
var id = location.hash.substring(1),
|
||||||
element;
|
element;
|
||||||
|
|
||||||
|
// fix #221 图库展示结束后禁止重新跳转
|
||||||
|
if (e.oldURL.indexOf('#gallery-') !== -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!/^[A-z0-9_-]+$/.test(id)) {
|
if (!/^[A-z0-9_-]+$/.test(id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue