User:Manishearth/patroltab.js

/*This script adds a patrol tab to the cactions bar which marks the page as patrolled (it's a copy of the "[Mark as patrolled]" link at the bottom of the page) The tab only shows up if you have visited the page from newpages if(document.getElementsByClassName("patrollink").length>=1){ addOnloadHook(function { mw.util.addPortletLink('p-cactions',"http:\/\/en.wikipedia.org"+document.getElementsByClassName("patrollink")[0].childNodes[1],"Patrol","ca-patrol","Mark as patrolled","p") }) }