code formatting (#9)

No changes in this commit besides formatting
This commit is contained in:
Joe 2021-05-10 20:51:09 +08:00 committed by GitHub
parent 14432d0d4b
commit ee0d7478fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 94 additions and 94 deletions

View File

@ -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 {