User:Guarapiranga/accessKeysCheatSheet.js

// Adds alt+shift+? as an access key to show a list of all default access keys

$( => {	let dialog;	$('').attr('accesskey', '?').text('This access keys cheat sheet').hide.click( => { if (dialog) { if (dialog.isOpened) { dialog.close; } else { dialog.open({					actions: [],					size: 'medium'				}); }			return false; }		mw.loader.using('oojs-ui-windows', => {			let winMan = new OO.ui.WindowManager;			winMan.$element.css('width', '35em').appendTo(document.body);			dialog = new OO.ui.MessageDialog;			winMan.addWindows([dialog]);			$(' ').addClass('wikitable').css('width', '100%').append( $('[accesskey]').map(function {					return $(' ').append( $(' ').text(this.accessKey.toUpperCase), $(' ').text(							this.getAttribute('aria-label') ||							this.title.replace(/ \[.+?\]/, '') ||							this.textContent ||							this.value ||							$(`label[for="${this.id}"]`).text						) );				}).get ).appendTo(dialog.text.$element);			dialog.open({ actions: [], size: 'medium' });		});		return false; }).appendTo(document.body); });