iorate / ublacklist

Blocks specific sites from appearing in Google search results
https://iorate.github.io/ublacklist/
MIT License
5.69k stars 295 forks source link

Add kagi.ts search-engine #483

Closed GeorgeIsInTheAir closed 5 months ago

GeorgeIsInTheAir commented 5 months ago

This PR adds Kagi search engine support.

kagi

aug-dev commented 5 months ago

HOLY MOLY!

This was unexpected haha!

aug-dev commented 5 months ago

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

https://github.com/iorate/ublacklist/blob/a663ffac52205a187878a4937576fef7cfad18de/src/scripts/search-engines/kagi.ts#L19-L21

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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

Chamiu commented 5 months ago

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.

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 8.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

notDavid commented 4 months ago

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 commented 4 months ago

One More Thing... and more for macOS.

Chamiu commented 4 months ago

@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 commented 4 months ago

@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 commented 4 months ago

@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).