diff --git a/extension/fg/frontend.js b/extension/fg/frontend.js index 6234528..248c355 100644 --- a/extension/fg/frontend.js +++ b/extension/fg/frontend.js @@ -98,22 +98,24 @@ function onHTMLMutation(mutationsList, cardCreator) { }; function handleKeyDown(e, cardCreator) { - switch (e.key) { - case 'e': - case 'E': - if (e.ctrlKey || e.altKey || e.metaKey) - return; - const caption = document.querySelector('.caption.active'); - if (!caption || !caption.getAttribute('data-caption-id')) - return; - - const selectionRange = cardCreator.findSelectionRange(window.getSelection()); - const start = (selectionRange && selectionRange.length > 0) ? selectionRange[0] : caption; - const id = start.getAttribute('data-caption-id'); - cardCreator.addCard(id); - break; - default: - break; + if (document.activeElement !== document.getElementById("custom-style-box")) { // Check if custom style textarea is in focus + switch (e.key) { + case 'e': + case 'E': + if (e.ctrlKey || e.altKey || e.metaKey) + return; + const caption = document.querySelector('.caption.active'); + if (!caption || !caption.getAttribute('data-caption-id')) + return; + + const selectionRange = cardCreator.findSelectionRange(window.getSelection()); + const start = (selectionRange && selectionRange.length > 0) ? selectionRange[0] : caption; + const id = start.getAttribute('data-caption-id'); + cardCreator.addCard(id); + break; + default: + break; + } } } diff --git a/index.html b/index.html index 4baf4a4..1cbd155 100644 --- a/index.html +++ b/index.html @@ -862,8 +862,7 @@ default /> - - +
@@ -952,6 +951,15 @@

Subtitle font size

+

+

Subtitle styling

+
+

+ Apply custom inline styles to the subtitles, such as fonts. +

+ +
+

Hide text matching regex

@@ -1246,6 +1254,7 @@

Usage

videoAlignment: 'top', showVideoControls: true, subtitleFontSize: 1.0, + subtitleStyling: '', regexReplacements: [ { regex: '\\(\\(.*?\\)\\)', replaceText: ''}, { regex: '\\(.*?\\)', replaceText: ''},