User:Rye Greenwood/common.js

$(document).keydown(function(keydownEvent) {	if (keydownEvent.ctrlKey && keydownEvent.shiftKey) {		var diffType = ;		switch (keydownEvent.which) {			case 85:				diffType = 'Old';				break;			case 79:				diffType = 'New';				break;			default:				return;		}		if (diffType !== ) {			var diffId = mw.config.get('wgDiff' + diffType + 'Id');			if (diffId !== null) {				var pagename = mw.config.get('wgPageName').replace(/_/g, ' ');				var clipboardText = '\n\\\\\n' + pagename + '\n' + diffId + '\n';				navigator.clipboard.writeText(clipboardText);				mw.notify(clipboardText, { title: 'Copied to clipboard:' });			}		}	} });