| 166 | if (['INPUT', 'TEXTAREA', 'SELECT'].includes(element.tagName)) return true |
| 167 | return element.getAttribute('role') === 'textbox' |
| 168 | } |
| 169 | for (const permutation of getHotkeyPermutations(settings().openHotkey)) { |
| 170 | createShortcut(permutation, () => { |
| 171 | if (!isEditableTarget(document.activeElement)) toggleOpen() |
| 172 | }) |
| 173 | } |
| 174 | }) |
| 175 | |
| 176 | const { theme } = createTheme() |
| 177 | createEffect(() => { |
| 178 | const activeDocument = pip().pipWindow?.document ?? document |
| 179 | setDocumentTheme(activeDocument, themeOwner, theme()) |
| 180 | onCleanup(() => clearDocumentTheme(activeDocument, themeOwner)) |
| 181 | }) |
| 182 | |
| 183 | return ( |