<?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%2FUnwatch</id>
	<title>MyWiki:WikiProject User scripts/Scripts/Unwatch - 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%2FUnwatch"/>
	<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_User_scripts/Scripts/Unwatch&amp;action=history"/>
	<updated>2026-04-22T15:28:19Z</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/Unwatch&amp;diff=11397564&amp;oldid=prev</id>
		<title>imported&gt;Amorymeltzer: Remove legacy globals per phab:T72470 (via WP:JWB)</title>
		<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_User_scripts/Scripts/Unwatch&amp;diff=11397564&amp;oldid=prev"/>
		<updated>2021-02-07T12:55:11Z</updated>

		<summary type="html">&lt;p&gt;Remove legacy globals per &lt;a href=&quot;/index.php?title=Phab:T72470&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Phab:T72470 (page does not exist)&quot;&gt;phab:T72470&lt;/a&gt; (via &lt;a href=&quot;/index.php?title=WP:JWB&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:JWB (page does not exist)&quot;&gt;WP:JWB&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* This script adds an &amp;quot;unwatch&amp;quot; link to each entry in your watchlist.  This version works regardless of whether you have the &amp;quot;Enhanced recent changes&amp;quot; option selected in your [[Special:Preferences|user preferences]].  By default the links take you back to [[Special:Watchlist|your watchlist]].  If you&amp;#039;d prefer them to take you to a &amp;quot;Removed from watchlist&amp;quot; page like the unwatch links at the top of the watched pages, uncomment the second line in the function. &lt;br /&gt;
&lt;br /&gt;
Other versions:&lt;br /&gt;
* [[User:Ilmari_Karonen/unwatch.js]] (&amp;#039;&amp;#039;legacy script&amp;#039;&amp;#039;)&lt;br /&gt;
* [[User:Quarl/watchlist.js]]&lt;br /&gt;
* [[user:js/watchlist]]&lt;br /&gt;
* [[Bugzilla:424]] (if implemented)&lt;br /&gt;
&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
addOnloadHook(function () {&lt;br /&gt;
&lt;br /&gt;
    // Check if we&amp;#039;re on the watchlist&lt;br /&gt;
    if (!mw.config.get(&amp;#039;wgCanonicalSpecialPageName&amp;#039;) || mw.config.get(&amp;#039;wgCanonicalSpecialPageName&amp;#039;) != &amp;quot;Watchlist&amp;quot;) return;&lt;br /&gt;
    if (!document.forms[0] || !document.forms[0].namespace) return;&lt;br /&gt;
&lt;br /&gt;
    // Unwatch links go back to watchlist with &amp;quot;Removing requested items from watchlist...&amp;quot; message&lt;br /&gt;
    var query_prefix = &amp;quot;title=&amp;quot;+encodeURIComponent(mw.config.get(&amp;#039;wgPageName&amp;#039;))+&amp;quot;&amp;amp;action=submit&amp;amp;remove=1&amp;amp;id[]=&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    // ...or...&lt;br /&gt;
    // Unwatch links go to &amp;quot;Removed from watchlist&amp;quot; page&lt;br /&gt;
    //var query_prefix = &amp;quot;action=unwatch&amp;amp;title=&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    // get list of all links in content:&lt;br /&gt;
    var links = document.getElementById(&amp;#039;content&amp;#039;).getElementsByTagName(&amp;#039;a&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
    // make a static copy of the nodelist and lose the original for speed&lt;br /&gt;
    // while we&amp;#039;re at it, prune the uninteresting links from the list&lt;br /&gt;
    var linksCopy = new Array ();&lt;br /&gt;
    for (var i = 0; i &amp;lt; links.length; i++) {&lt;br /&gt;
        if (/[?&amp;amp;]action=history([&amp;amp;#]|$)/.test(links[i].href)) linksCopy.push(links[i]);&lt;br /&gt;
    }&lt;br /&gt;
    links = linksCopy;&lt;br /&gt;
&lt;br /&gt;
    for (var i = 0; i &amp;lt; links.length; i++) {&lt;br /&gt;
        // create unwatch link and append it after history link&lt;br /&gt;
        var unwatch = document.createElement(&amp;#039;a&amp;#039;);&lt;br /&gt;
        unwatch.href = mw.config.get(&amp;#039;wgServer&amp;#039;) + mw.config.get(&amp;#039;wgScriptPath&amp;#039;) + &amp;quot;/index.php?&amp;quot; + query_prefix + encodeURIComponent(links[i].title);&lt;br /&gt;
        unwatch.title = &amp;quot;Unwatch &amp;quot;+links[i].title;&lt;br /&gt;
        unwatch.appendChild(document.createTextNode(&amp;quot;unwatch&amp;quot;));&lt;br /&gt;
        links[i].parentNode.insertBefore(unwatch, links[i].nextSibling);&lt;br /&gt;
&lt;br /&gt;
        // insert a delimiter between the two links&lt;br /&gt;
        var delim = links[i].previousSibling;&lt;br /&gt;
        delimText = (delim.nodeType == 3 ? delim.nodeValue : &amp;quot;&amp;quot;); // kluge to handle case where &amp;quot;diff&amp;quot; is unlinked&lt;br /&gt;
        delim = document.createTextNode(delimText.replace(/^.*diff/, &amp;quot;&amp;quot;));&lt;br /&gt;
        links[i].parentNode.insertBefore(delim, unwatch);&lt;br /&gt;
    }&lt;br /&gt;
});&lt;/div&gt;</summary>
		<author><name>imported&gt;Amorymeltzer</name></author>
	</entry>
</feed>