ppy / osu-web

the browser-facing portion of osu!
https://osu.ppy.sh
GNU Affero General Public License v3.0
968 stars 381 forks source link

Google Chrome internal website search does not fully work #4728

Closed NoffyNoffeh closed 1 year ago

NoffyNoffeh commented 5 years ago

If you type in osu.ppy.sh in the google chrome url/search bar then hit space, it gives you the option to search the website using its own search quickly.

However, if you actually try to do this, you get taken to osu's search page without your search term actually there. 2019-07-26_16-08-55

Doing the google chrome quick search should already fill out your search term once you are taken to osu's search page.

notbakaneko commented 4 years ago

Chrome adds this automatically based on a heuristic, there isn't anything in osu-web that provides omnibox support

peppy commented 4 years ago

Is this safe to close as not-our-issue?

cl8n commented 4 years ago

you can add support for it explicitly, I just told noffy she should try adding this herself because all that's needed is https://developer.mozilla.org/en-US/docs/Web/OpenSearch

muekoeff commented 4 years ago

Sample OpenSearch-file which can be referenced by inserting <link rel="search" type="application/opensearchdescription+xml" href="/path/to/opensearch.xml" title="osu! beatmap listing" /> into <head>:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
    <ShortName>osu! beatmap listing</ShortName>
    <Description>osu! beatmap listing</Description>
    <Url method="get" template="https://osu.ppy.sh/beatmapsets?q={searchTerms}" type="text/html"/>
    <Image height="16" type="Image/x-icon" width="16">https://osu.ppy.sh/favicon.ico</Image>
    <moz:SearchForm>https://osu.ppy.sh/beatmapsets</moz:SearchForm>
</OpenSearchDescription>
LittleEndu commented 3 years ago

Shouldn't something like https://osu.ppy.sh/home/search?query={searchTerms} be used instead?