From 0ed4100709475b8f53689091477d6df7f6f8c4b5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 6 Sep 2020 01:03:32 +0200 Subject: Allow for Escape Close the modal with either the Escape key or . --- netflix-esc.user.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netflix-esc.user.js b/netflix-esc.user.js index b288233..0424e4e 100644 --- a/netflix-esc.user.js +++ b/netflix-esc.user.js @@ -24,7 +24,10 @@ document.addEventListener( 'keyup', function(e) { - if (e.key === 'Escape') { + if ( + e.key === 'Escape' + || (e.ctrlKey && e.key === '[') + ) { var close_button = document.querySelector( '[data-uia="previewModal-closebtn"] > [role="button"]' ); -- cgit v1.2.3