Closed AnnaS82 closed 1 year ago
You'll need to run the search using the javascript field and change your template.
Template: https://fmovies.to/
Post-search Script:
(() => {
let input = document.querySelector('input');
input.value = searchTerms;
input.dispatchEvent(new KeyboardEvent('keyup'));
input.form.submit();
})();
Thank you ssborbis, this works great! :-)
Another problemchild for me is this:
https://burningseries.co/andere-serien/
Is there a solution for this too?
I can't load that website
Oh, then you are being blocked by your provider.
Does this one work for you: https://burningseries.tw/andere-serien
Something like...
document.querySelector('#serInput').value = searchTerms;
searchSeries();
Hm, this fills in the search term already, but doesn't trigger the search itself. Only one more keypress is needed.
So similar to your above code I tried:
(() => {
let input = document.querySelector('#serInput');
input.value = searchTerms;
input.dispatchEvent(new KeyboardEvent('keyup'));
})();
But that is not doing the trick either.
I read through this thread and tried a few things: https://stackoverflow.com/questions/596481/is-it-possible-to-simulate-key-press-events-programmatically
But I suppose the problem lies with React, as described here: https://stackoverflow.com/questions/40894637/how-to-programmatically-fill-input-elements-built-with-react/70848568
Unfortunately this is way above my programming abilities.
Do you have an idea?
The scripts are working through the console once the page is open, but not through the addon. I'm wondering if there's some page-level event you need to trigger before the search is allowed, like a focus event or something. I'm looking but nothing is popping out.
Nevermind, it was simpler than that. Just needed to bubble the event up
(() => {
let input = document.querySelector('#serInput');
input.value = searchTerms;
input.dispatchEvent(new KeyboardEvent('keyup', {bubbles:true}));
})();
Ahhh, this works mega nice! :-) Thank you a lot!
Glad to help
Dear Ssborbis, ... I have another site, which makes problems.
The code that ContextSearch adds is a simple: https://myflixer.pw/search/{searchTerms}
. It works fine for single words as searchterms. ... But with more words the page needs a "-" between the words in the url, whereas ContextSearch adds a " ".
Is there an easy fix for that? And also, is there a place in the documentation, where things like this are explained, so I don't need to bother you all the time? ... I couldn't find it.
Is there an easy fix for that?
That's what the Modify Terms Regex
field is for.
/\s+/-/g
I believe gets the job done. It might be in the readme on the support site ( github ). I'll freely admit, documentation is not my forte, but there's probably mention of it somewhere.
https://github.com/ssborbis/ContextSearch-web-ext#modifyingterms
Ah, thank you, Ssborbis! This works!
And oh yes, it is all explained in the readme. I don't know how I did miss that. I'm sorry!
Thank you! :-)
No problem
Hello,
I try to add this page with right-clicking the search bar on the website and select "Add To ContextSearch" from the context menu. And I also tried the same with the mycroftproject.
What happens is, a new entry appears in the menu, but the search does not work. The page gives an error message.
This is the page: https://fmovies.to
Can someone help me with this?