User:Chlod/Scripts/RCP-CV Quicklink.js

// RCP-CV Quicklink // Recent Changes Patrol - Counter-Vandalism Quicklink // Author: Chlod // Version: 1.0.0-REL

// Adds a quick link to the RecentChanges page. Defaults to my configuration.

// DO NOT MODIFY UNLESS YOU KNOW WHAT YOU'RE DOING const rcpcvqlURLRegex = /https:\/\/[a-z]{2,4}\.wikipedia\.org\/wiki\/Special\:RecentChanges[?A-Za-z0-9=%&_\-]*/gi;

if (rcpcvqlTargetLink === undefined) var rcpcvqlTargetLink = "https://en.wikipedia.org/wiki/Special:RecentChanges" + "?damaging=likelybad%3Bverylikelybad&goodfaith=likelybad%3Bverylikelybad&hidebots=1&hidecategorization=1" + "&hideWikibase=1&limit=50&days=7&damaging__likelybad_color=c3&damaging__verylikelybad_color=c3&goodfaith" + "__likelybad_color=c4&goodfaith__verylikelybad_color=c5&lastRevision__hidelastrevision_color=c1&urlversion=2";

$(document).ready( => {	if (typeof(rcpcvqlTargetLink) !== "string") {		$("#p-personal #pt-logout").before(`RCP-CV `);	} else if (!rcpcvqlURLRegex.test(rcpcvqlTargetLink)) {		$("#p-personal #pt-logout").before(`RCP-CV `);	} else {		$("#p-personal #pt-logout").before(`RCP-CV`);	} });