User:NQ/watchlistToggle.js

$(function{	if (mw.config.get('wgPageName')!="Special:Watchlist") return;        var watchlistdropdown = document.createElement('SELECT');        	watchlistdropdown.options[watchlistdropdown.options.length] = new Option('Show visited');        	watchlistdropdown.options[watchlistdropdown.options.length] = new Option('Hide visited');        	watchlistdropdown.onchange=function{        	var selectoption=this.options[this.selectedIndex];        		if (selectoption.value ==='Hide visited'){        			$('.mw-changeslist-line-not-watched').hide;       			}				else { 					$('.mw-changeslist-line-not-watched').show;				}			};

$(watchlistdropdown).insertAfter( $('.namespaceselector')); $(watchlistdropdown).before(" "); });