MediaWiki:ContribRC/code.js

function ContribToggle{ //Something happens when you click the stop button. }

function ContribRC{ var $temp = $(' '); var href = location.href.replace(/#[\S]*/, ''); $temp.load(href + ' #mw-content-text', function {			var $newContent = $temp.children('#mw-content-text');			if ($newContent.length) {				$('#mw-content-text').replaceWith($newContent);				mw.util.$content = $newContent;			}		}); $temp.remove; }

var wdscontrib = window.wdscontribs || false, contribRefresh = window.contribRefresh || 1000;

$(function { if(wgCanonicalSpecialPageName === "Contributions")   {        if (wdscontrib === true){ $(".UserProfileMasthead .masthead-avatar .avatar").click(function  { $("#contentSub").append(' Start RC '); $("#contentSub").append(' Stop RC '); });       } else {               $( ' Start RC  ' ).insertAfter('.wds-global-navigation__search:first');       $( ' Stop RC  ' ).insertAfter('.wds-global-navigation__search:first');       } } });