<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-autonum.js</id>
	<title>MediaWiki:Gadget-autonum.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AGadget-autonum.js"/>
	<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=MediaWiki:Gadget-autonum.js&amp;action=history"/>
	<updated>2026-04-27T05:58:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://compusofia.com/w/index.php?title=MediaWiki:Gadget-autonum.js&amp;diff=1956&amp;oldid=prev</id>
		<title>Majestix: 1 revision imported: Initial Setup</title>
		<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=MediaWiki:Gadget-autonum.js&amp;diff=1956&amp;oldid=prev"/>
		<updated>2026-04-09T11:12:46Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Initial Setup&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:12, 9 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikiNonStop:diff:1.41:old-1955:rev-1956 --&gt;
&lt;/table&gt;</summary>
		<author><name>Majestix</name></author>
	</entry>
	<entry>
		<id>https://compusofia.com/w/index.php?title=MediaWiki:Gadget-autonum.js&amp;diff=1955&amp;oldid=prev</id>
		<title>en&gt;Krinkle: Set number as data attribute instead of inline text, and display via CSS before pseudo-element. This matches the way it works on pages without TOC. This is also fixes the issue of gadgets reading text from headings, reported by @JWBTH, Talk:Snippets/Auto-number_headings#c-JWBTH-20240722135600-Wrap_numbers_in_a_class.</title>
		<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=MediaWiki:Gadget-autonum.js&amp;diff=1955&amp;oldid=prev"/>
		<updated>2024-07-28T21:12:13Z</updated>

		<summary type="html">&lt;p&gt;Set number as data attribute instead of inline text, and display via CSS before pseudo-element. This matches the way it works on pages without TOC. This is also fixes the issue of gadgets reading text from headings, reported by @&lt;a href=&quot;/w/index.php?title=User:JWBTH&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:JWBTH (page does not exist)&quot;&gt;JWBTH&lt;/a&gt;, &lt;a href=&quot;/w/index.php?title=Talk:Snippets/Auto-number_headings&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Talk:Snippets/Auto-number headings (page does not exist)&quot;&gt;Talk:Snippets/Auto-number_headings#c-JWBTH-20240722135600-Wrap_numbers_in_a_class&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/**&lt;br /&gt;
 * Auto-number headings&lt;br /&gt;
 *&lt;br /&gt;
 * @source https://www.mediawiki.org/wiki/Snippets/Auto-number_headings&lt;br /&gt;
 * @author Krinkle&lt;br /&gt;
 * @version 2024-07-28&lt;br /&gt;
 */&lt;br /&gt;
var toc = document.querySelector(&amp;#039;#toc&amp;#039;);&lt;br /&gt;
if (toc) {&lt;br /&gt;
  document.body.classList.add(&amp;#039;tpl-autonum-attr&amp;#039;);&lt;br /&gt;
  // Support legacy Parser: &amp;lt;h2&amp;gt;&amp;lt;span class=mw-headline id=…&amp;gt;&lt;br /&gt;
  // Support Parsoid: &amp;lt;section&amp;gt;&amp;lt;div class=mw-heading&amp;gt;&amp;lt;h2 id…&amp;gt;&lt;br /&gt;
  document.querySelectorAll(&amp;#039;.mw-parser-output :is(h1,h2,h3,h4,h5,h6) .mw-headline[id], .mw-parser-output .mw-heading [id]:is(h1,h2,h3,h4,h5,h6)&amp;#039;).forEach(function (headline) {&lt;br /&gt;
    var num = toc.querySelector(&amp;#039;a[href=&amp;quot;#&amp;#039; + CSS.escape(headline.id) + &amp;#039;&amp;quot;] .tocnumber&amp;#039;);&lt;br /&gt;
    if (num) headline.setAttribute(&amp;#039;data-autonum&amp;#039;, num.textContent);&lt;br /&gt;
  });&lt;br /&gt;
} else {&lt;br /&gt;
  document.body.classList.add(&amp;#039;tpl-autonum&amp;#039;);&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>en&gt;Krinkle</name></author>
	</entry>
</feed>