Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kagi.ts search-engine #483

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Add kagi.ts search-engine #483

merged 1 commit into from
Jun 9, 2024

Conversation

GeorgeIsInTheAir
Copy link
Contributor

This PR adds Kagi search engine support.

kagi

@aug-dev
Copy link
Contributor

aug-dev commented Jun 4, 2024

HOLY MOLY!

This was unexpected haha!

@aug-dev
Copy link
Contributor

aug-dev commented Jun 6, 2024

First off, thank you for you contribution!

It's always cool to see when someone dives into a codebase lacking documentation, figures things out and makes a contribution anyways.

General Thoughts

I didn't know that Kagi was a thing.

The concept of a paid search engine sounds really interesting to me. (But that's beside the point.)

I've tested this PR and things seem to be working nicely when it comes to blocking regular search results:

kagi-demo.webm

But I was not able to get the controlHandler to show up, and it seems that the target used in the entryHandler is not present on any of the available example pages.

Screenshot from 2024-06-06 20-16-56

controlHandlers: [
{
target: "._ext_filter_box",

target-not-found

This leads to a genuine question that I have in mind when it comes to adding support to this search engine.

Generally speaking, the process of debugging the behavior of uBlacklist involves reproducing a search query on your local machine, opening up Browser Developer Tools and inspecting the DOM.

But since Kagi is a paid service and I don't have a subscription (I'll assume iorate doesn't have one well), this could lead to us being unable to solve a bug report on our own.

Would you/someone from Kagi be willing to work on user submitted bug reports, if some issue arrises? (e.g. a change to Kagi's layout that broke the position of a controlhandler.)

Kagi Supports Blocking Websites

It seems that Kagi already has some interesting functionality when it comes to blocking results. Here's an excerpt from the main page:

Mute or prefer websites in your results.

kagi-block-feature

Although, I can see the value of using uBlacklist with it, since there are other cool things provided by the extension, such as blocking results with regular expressions, highlighting them, etc.

I'm only mentioning this to know if you have an opinion about it.

Afterthoughts

Anyways, it's mostly up to iorate to decide things here, and nothing of what I said before is intended to invalidate the work on this PR.

I think it could be a cool thing if done properly.

@GeorgeIsInTheAir
Copy link
Contributor Author

But I was not able to get the controlHandler to show up, and it seems that the target used in the entryHandler is not present on any of the available example pages.

Thank you for the excellent suggestion regarding the example page (I forgot about that page). On the actual search page controlHandler works fine (you just need to be logged in). I will make sure to add the target element on the example page as well.

But since Kagi is a paid service and I don't have a subscription (I'll assume iorate doesn't have one well), this could lead to us being unable to solve a bug report on our own.

We have a Trial plan with 100 free searches (https://kagi.com/onboarding?p=choose_plan).

Would you/someone from Kagi be willing to work on user submitted bug reports, if some issue arrises? (e.g. a change to Kagi's layout that broke the position of a controlhandler.)

Of course.

Although, I can see the value of using uBlacklist with it, since there are other cool things provided by the extension, such as blocking results with regular expressions, highlighting them, etc.

This addition was based on a user suggestion to incorporate ublacklist support. You can read more here

@aug-dev
Copy link
Contributor

aug-dev commented Jun 7, 2024

We have a Trial plan with 100 free searches

Oh, that's actually pretty cool. I will try it later.

This addition was based on a user suggestion to incorporate ublacklist support. You can read more here

I see, it makes more sense now.

@iorate
Copy link
Owner

iorate commented Jun 8, 2024

Thank you for your contribution.
I will review it later.

@iorate iorate merged commit 34dd7b8 into iorate:master Jun 9, 2024
1 check passed
@Chamiu Chamiu mentioned this pull request Jun 13, 2024
@Chamiu
Copy link

Chamiu commented Jun 13, 2024

Thanks to @GeorgeIsInTheAir and @iorate.

I'm really glad that I hope for Kagi forum and here.
I'm really happy that both sides contributed.

Copy link

🎉 This PR is included in version 8.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@notDavid
Copy link

Hi all, could someone clarify if this is already, or when it will be, available in the uBlacklist iOS/iPadOS app for Safari

Thank you!

@Chamiu
Copy link

Chamiu commented Jun 23, 2024

One More Thing...
and more for macOS.

@Chamiu
Copy link

Chamiu commented Jun 23, 2024

@GeorgeIsInTheAir GeorgeIsInTheAir

It doesn't seem to be working.
uBlacklist 8 8 0

uBlacklist for Safari 8.8.2 with Safari 17.5 (19618.2.12.11.6) on macOS Sonoma.5

Even if it works with Orion, it may not work with Safari.
The update content of "uBlacklist for Safari 8.8.2" is not synchronized with here, so I feel distrustful at uBlacklist for Safari 8.8.2.

@aug-dev
Copy link
Contributor

aug-dev commented Jun 24, 2024

@Chamiu

The extension has recently gone through a lot of changes in the back-end side of things (the grammar that is used for creating rules has been expanded.)

But it seems that there are some issues when it comes to the Safari version that are still being sorted out.

See #492 for more details.

@Chamiu
Copy link

Chamiu commented Jun 24, 2024

@aug-dev Thanks guide.

There is a difference between the version number and the update content between the Safari version and the vanilla version, so I started trying Orion Browser by Kagi 0.99.

uBlacklist 8.8.1 on Orion Browser by Kagi 0.99 on macOS Sonoma.5 is working and no problem.
But enable/disabe is not stable on uBlacklist 8.8.1 on Orion Browser by Kagi 1.3.8 (13) (WebKit 8618.2.12.10.9).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants