mirror of
https://github.com/discourse/DiscoTOC.git
synced 2025-02-16 16:34:49 +00:00
only create toc for topics ignore replies
This commit is contained in:
parent
82915d7ff0
commit
6133da21d4
@ -267,8 +267,12 @@ I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = I18n.t(
|
||||
$.fn.dtoc = $elem => {
|
||||
run.scheduleOnce("sync", () => {
|
||||
if ($elem.hasClass("d-editor-preview")) return;
|
||||
if (!$elem.parents("article#post_1").length) return
|
||||
const dToc = $elem.find(`[data-theme-toc="true"]`);
|
||||
|
||||
|
||||
|
||||
|
||||
if (!dToc.length) return this;
|
||||
|
||||
const body = $elem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user