jglowa commited on
Commit
0b49c00
·
verified ·
1 Parent(s): 6436714

Update public/script.js

Browse files
Files changed (1) hide show
  1. public/script.js +2 -2
public/script.js CHANGED
@@ -5,9 +5,9 @@
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;
 
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
+ Object.getOwnPropertyDescriptor(Object.getPrototypeOf(input), 'value').set.call(el, params.get('q'));
11
  input.dispatchEvent(new Event('input', {bubbles: true}));
12
  obs.disconnect();
13
  return;