Rapptz / jimaku

A site for hosting (Japanese) subtitles
https://jimaku.cc
GNU Affero General Public License v3.0
48 stars 3 forks source link

[Feature Request] Browser Search Handler #2

Closed MarvNC closed 4 weeks ago

MarvNC commented 3 months ago

You can do it manually but it would be nice if it was enabled for everyone.

https://developer.mozilla.org/en-US/docs/Web/OpenSearch

Rapptz commented 3 months ago

I'm not sure it'd work since the filter on the site is actually entirely client sided. Though to be honest, I'm not sure I understand the mechanics on how this works in general.

MarvNC commented 3 months ago

Basically it lets the browser automatically add a "tab to search" to the website. Could probably still work client sided if you just add something to the url that the client picks up on and searches for after loading?

Rapptz commented 4 weeks ago

I didn't implement this using OpenSearch since I don't really want to add the XML and it seems soft deprecated. However, after some research, to allow users to add a keyword search to the site using the right click menu (on Firefox anyway) you just need to wrap the input in a form. So I implemented that here: https://github.com/Rapptz/jimaku/commit/c42e2795fa3e2f4c3efc410a1aba8b2986d5ddc1

image