parent
14432d0d4b
commit
ee0d7478fd
|
@ -105,9 +105,7 @@
|
|||
const previousHeader = $(self.options.selectors).eq(index - 1);
|
||||
const previousTagName = previousHeader.prop("tagName").charAt(1);
|
||||
|
||||
const currentTagName = $(this)
|
||||
.prop("tagName")
|
||||
.charAt(1);
|
||||
const currentTagName = $(this).prop("tagName").charAt(1);
|
||||
|
||||
if (currentTagName < previousTagName) {
|
||||
self.element
|
||||
|
@ -166,7 +164,7 @@
|
|||
},
|
||||
|
||||
highlightItemsOnScroll: self => {
|
||||
$('html, body')
|
||||
$("html, body")
|
||||
.promise()
|
||||
.done(function () {
|
||||
const winScrollTop = $(window).scrollTop();
|
||||
|
@ -234,7 +232,7 @@
|
|||
scrollTo: function (elem) {
|
||||
const currentDiv = $(`[data-d-toc="${elem.attr("data-d-toc")}"]`);
|
||||
|
||||
$('html, body').animate(
|
||||
$("html, body").animate(
|
||||
{
|
||||
scrollTop: `${currentDiv.offset().top - minimumOffset()}`
|
||||
},
|
||||
|
@ -250,7 +248,8 @@
|
|||
});
|
||||
})(() => {});
|
||||
|
||||
api.decorateCooked($elem => {
|
||||
api.decorateCooked(
|
||||
$elem => {
|
||||
run.scheduleOnce("actions", () => {
|
||||
if ($elem.hasClass("d-editor-preview")) return;
|
||||
if (!$elem.parents("article#post_1").length) return;
|
||||
|
@ -335,7 +334,9 @@
|
|||
selectors: dTocHeadingSelectors
|
||||
});
|
||||
});
|
||||
}, {id: "disco-toc"});
|
||||
},
|
||||
{ id: "disco-toc" }
|
||||
);
|
||||
|
||||
api.cleanupStream(() => {
|
||||
$(window).off("scroll.d-toc");
|
||||
|
@ -362,7 +363,6 @@
|
|||
}
|
||||
I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = " ";
|
||||
|
||||
|
||||
api.addToolbarPopupMenuOptionsCallback(() => {
|
||||
const composerController = api.container.lookup("controller:composer");
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue