Topic on Talk:Talk pages project

GhostInTheMachine (talkcontribs)

The talk pages (on ENWP) now seem to include a lot of HTML comments containing Discussion Tools metadata even if I do not have the Discussion tools Beta gadget enabled.

  • <!--__DTELLIPSISBUTTON__-->
  • <!--__DTLATESTCOMMENTPAGE__{"id": ...
  • <!--__DTCOMMENTCOUNT__2__-->
  • <!--__DTAUTHORCOUNT__2__-->

Are these for short-term debugging or do they have a function?

If they have a function, can the comments be converted to attributes on existing DIV tags, so that user scripts can make use of them.

Whatamidoing (WMF) (talkcontribs)

Are these comments still there?

GhostInTheMachine (talkcontribs)

Still

Matma Rex (talkcontribs)

They are basically a debugging thing. We use these HTML comments as placeholders in the parser cache, then replace them just before rendering the page with interface elements in the correct user language. We don't clean them up if the relevant features are disabled, so that it's easier to distinguish when DiscussionTools is working but disabled, and when it's not working. We probably could though, as we've probably fixed all bugs like that a long time ago.

If you wanted to use this information in a user script, I would recommend using this API to fetch the metadata about the discussion: action=discussiontoolspageinfo&prop=threaditemshtml&excludesignatures=1&page=Talk:The_Fighting_Temeraire (and using Special:DiscussionToolsDebug/Talk:The_Fighting_Temeraire to preview them in a human-readable way).

Reply to "Embedded HTML comments"