<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=MyWiki%3AWikiProject_User_scripts%2FScripts%2FAdd_edit_section_0</id>
	<title>MyWiki:WikiProject User scripts/Scripts/Add edit section 0 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=MyWiki%3AWikiProject_User_scripts%2FScripts%2FAdd_edit_section_0"/>
	<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_User_scripts/Scripts/Add_edit_section_0&amp;action=history"/>
	<updated>2026-04-22T14:47:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>http://70.231.62.181/index.php?title=MyWiki:WikiProject_User_scripts/Scripts/Add_edit_section_0&amp;diff=7764351&amp;oldid=prev</id>
		<title>imported&gt;SD0001: addPortletLink -&gt; mw.util.addPortletLink</title>
		<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_User_scripts/Scripts/Add_edit_section_0&amp;diff=7764351&amp;oldid=prev"/>
		<updated>2025-09-17T14:38:20Z</updated>

		<summary type="html">&lt;p&gt;addPortletLink -&amp;gt; mw.util.addPortletLink&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// Adds a tab allowing you to edit the 0th section of a page (the top area usually used as an introduction).&lt;br /&gt;
&lt;br /&gt;
$.when($.ready, mw.loader.using(&amp;#039;mediawiki.util&amp;#039;)).then(function () {&lt;br /&gt;
    var x;&lt;br /&gt;
    if (!(x = document.getElementById(&amp;#039;ca-edit&amp;#039;) )) return;&lt;br /&gt;
    var url;&lt;br /&gt;
    if (!(url = x.getElementsByTagName(&amp;#039;a&amp;#039;)[0] )) return;&lt;br /&gt;
    if (!(url = url.href )) return;&lt;br /&gt;
    var y = mw.util.addPortletLink(&amp;#039;p-cactions&amp;#039;, url+&amp;quot;&amp;amp;section=0&amp;quot;, &amp;#039;0&amp;#039;, &amp;#039;ca-edit-0&amp;#039;,&lt;br /&gt;
                           &amp;#039;Edit the lead section of this page&amp;#039;, &amp;#039;0&amp;#039;, x.nextSibling);&lt;br /&gt;
&lt;br /&gt;
    y.className = x.className;  // steal classes from the the edit tab...&lt;br /&gt;
    x.className = &amp;#039;istalk&amp;#039;;     // ...and make the edit tab have no right margin&lt;br /&gt;
&lt;br /&gt;
    // exception: don&amp;#039;t steal the &amp;quot;selected&amp;quot; class unless actually editing section 0:&lt;br /&gt;
    if (/(^| )selected( |$)/.test(y.className)) {&lt;br /&gt;
        if (!document.editform || !document.editform.wpSection&lt;br /&gt;
            || document.editform.wpSection.value != &amp;quot;0&amp;quot;) {&lt;br /&gt;
            y.className = y.className.replace(/(^| )selected( |$)/g, &amp;quot;$1&amp;quot;);&lt;br /&gt;
            x.className += &amp;#039; selected&amp;#039;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// [[Category:Wikipedia scripts]]&lt;/div&gt;</summary>
		<author><name>imported&gt;SD0001</name></author>
	</entry>
</feed>