Open runningcheese opened 1 month ago
I cant access that website, even with a VPN. It must be blocked for me.
try this site: https://hailuoai.com
It's the same problem, when the site uses react framework, it can't insert content correctly, is there a solution to this problem? @ssborbis
if you can't open that site either. try https://www.meta.ai, the React Framework. @ssborbis
I see what you mean. I'm not sure what events need to be triggered to get the button to be clickable. It will take some investigation.
@ssborbis I have tried this code, and it works well now.
(async () => { await new Promise(r => setTimeout(r, 500)); let input = document.querySelector('textarea'); function setNativeValue(element, value) { const lastValue = element.value; element.value = value; const event = new Event('input', { bubbles: true }); const tracker = element._valueTracker; if (tracker) { tracker.setValue(lastValue);} element.dispatchEvent(event);} input.focus(); setNativeValue(input, searchTerms); await new Promise(r => setTimeout(r, 500)); input.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', keyCode: 13, bubbles: true })); })();
But the problem is, it still not working on https://kimi.moonshot.cn Can this issue be resolved? @ssborbis
Sorry, I can't reach that website to test. Where did you find the code you used to make it work? I'm trying to understand why it works.
Sorry, I can't reach that website to test. Where did you find the code you used to make it work? I'm trying to understand why it works.
I used ChatGPT to fix it.
I‘m trying to add this website to ContextSearch-web-ext.
Website: https://kimi.moonshot.cn
It's works with this code.
document.querySelector('[contenteditable]').textContent = searchTerms;
But the problem is, This website is built with the React framework. If we directly insert content, the search icon at the end won't be clickable. Can this issue be resolved?
I've tried lots of id and class, but not working. Thanks in advance.
@ssborbis