Coder Social home page Coder Social logo

Comments (8)

ssborbis avatar ssborbis commented on June 30, 2024

I cant access that website, even with a VPN. It must be blocked for me.

from contextsearch-web-ext.

runningcheese avatar runningcheese commented on June 30, 2024

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

from contextsearch-web-ext.

runningcheese avatar runningcheese commented on June 30, 2024

if you can't open that site either.
try https://www.meta.ai, the React Framework.
@ssborbis

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

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.

from contextsearch-web-ext.

runningcheese avatar runningcheese commented on June 30, 2024

@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 }));
})();

from contextsearch-web-ext.

runningcheese avatar runningcheese commented on June 30, 2024

But the problem is, it still not working on https://kimi.moonshot.cn
Can this issue be resolved?
@ssborbis

from contextsearch-web-ext.

ssborbis avatar ssborbis commented on June 30, 2024

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.

from contextsearch-web-ext.

runningcheese avatar runningcheese commented on June 30, 2024

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.

from contextsearch-web-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.