From 1660dabc91a24210fd9b231ff79272ec8e1410f6 Mon Sep 17 00:00:00 2001 From: Joe <33972521+hnb-ku@users.noreply.github.com> Date: Sat, 9 Mar 2019 10:35:26 +0800 Subject: [PATCH] code formatting --- common/header.html | 63 +--------------------------------------------- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/common/header.html b/common/header.html index 05aa12e..5fce57b 100644 --- a/common/header.html +++ b/common/header.html @@ -21,17 +21,14 @@ const mobileView = $("html").hasClass("mobile-view"), class: "d-toc-anchor-link", html: linkIcon }); - return link; }, dtocMobile = () => { $(".d-toc").toggleClass("d-toc-mobile"); }; - I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = I18n.t( themePrefix("topic_will_contain_a_table_of_contents") ); - (function(dToc) { dToc($, window); $.widget("discourse.dToc", { @@ -39,66 +36,51 @@ I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = I18n.t( this.generateDtoc(); this.setEventHandlers(); }, - generateDtoc: function() { let self = this, primaryHeadings = $(this.options.cooked).find( this.options.selectors.substr(0, this.options.selectors.indexOf(",")) ); - self.element.addClass("d-toc"); - primaryHeadings.each(function(index) { let selectors = self.options.selectors, ul = $("