jglowa commited on
Commit
8574ad7
·
verified ·
1 Parent(s): a1941a6

Update public/script.js

Browse files
Files changed (1) hide show
  1. public/script.js +2 -1
public/script.js CHANGED
@@ -5,9 +5,10 @@ addEventListener('load', () => {
5
  for (const m of mut) {
6
  for (const node of m.addedNodes) {
7
  if (node instanceof HTMLElement) {
8
- const input = node.querySelector('#chat-input');
9
  if (input) {
10
  input.value = params.get('q');
 
11
  obs.disconnect();
12
  return;
13
  }
 
5
  for (const m of mut) {
6
  for (const node of m.addedNodes) {
7
  if (node instanceof HTMLElement) {
8
+ const input = node.id === "chat-input" ? node : node.querySelector('#chat-input');
9
  if (input) {
10
  input.value = params.get('q');
11
+ input.dispatchEvent(new Event('input', {bubbles: true}));
12
  obs.disconnect();
13
  return;
14
  }