diff options
| author | Teddy Wing | 2020-09-06 01:31:40 +0200 |
|---|---|---|
| committer | Teddy Wing | 2020-09-06 01:31:40 +0200 |
| commit | 8796c1f7b3c115bb9e36da5d5500b98e4185f122 (patch) | |
| tree | 7761dd4c3053ca988544f74bb7dc422000862a38 /netflix-esc.user.js | |
| parent | 0ed4100709475b8f53689091477d6df7f6f8c4b5 (diff) | |
| download | netflix-esc-8796c1f7b3c115bb9e36da5d5500b98e4185f122.tar.bz2 | |
Show the info modal by pressing the 'i' key
Add a shortcut to show the info modal for an entry.
Diffstat (limited to 'netflix-esc.user.js')
| -rw-r--r-- | netflix-esc.user.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/netflix-esc.user.js b/netflix-esc.user.js index 0424e4e..59ca621 100644 --- a/netflix-esc.user.js +++ b/netflix-esc.user.js @@ -38,6 +38,18 @@ document.addEventListener( ); close_button.dispatchEvent(click); + + return; + } + + // Show info modal with 'i'. + if (e.key === 'i') { + var more_info_button = document.querySelector( + '.mini-modal-container button[data-uia="expand-to-detail-button"]' + ); + + var pointer_event = new PointerEvent('pointerdown', { bubbles: true }); + more_info_button.dispatchEvent(pointer_event); } } ); |
