ok this should work now, make sure to enable browser.search.suggest.enabled in ff aaaaaaaaaa

This commit is contained in:
lolcat committed 2026-11-08 16:50:37 -05:00
1 parent 24130effe6
commit b014a3199d
1 file changed
+4 -5
+4 -5
View File
@@ -36,13 +36,12 @@ if(
$domain = ($ssl ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"]; $domain = ($ssl ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"];
echo echo
'<?xml version="1.0" encoding="UTF-8"?>' . '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">' .
'<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">' .
'<ShortName>' . htmlspecialchars(config::SERVER_NAME) . ($ssl === false ? " ({$src})" : "") . '</ShortName>' . '<ShortName>' . htmlspecialchars(config::SERVER_NAME) . ($ssl === false ? " ({$src})" : "") . '</ShortName>' .
'<Description>' . htmlspecialchars(config::SERVER_SHORT_DESCRIPTION) . '</Description>' . '<Description>' . htmlspecialchars(config::SERVER_SHORT_DESCRIPTION) . '</Description>' .
'<InputEncoding>UTF-8</InputEncoding>' . '<InputEncoding>UTF-8</InputEncoding>' .
'<Image width="16" height="16" type="image/x-icon">' . htmlspecialchars($domain) . '/favicon.ico</Image>' . '<Image width="32" height="32" type="image/x-icon">' . htmlspecialchars($domain) . '/favicon.ico</Image>' .
'<Url type="text/html" method="GET" template="' . htmlspecialchars($domain) . '/web?s={searchTerms}"/>'; '<Url rel="results" type="text/html" method="GET" template="' . htmlspecialchars($domain) . '/web?s={searchTerms}"/>';
if( if(
isset($_GET["ac"]) && isset($_GET["ac"]) &&
@@ -50,7 +49,7 @@ if(
$_GET["ac"] != "disabled" $_GET["ac"] != "disabled"
){ ){
echo '<Url type="application/x-suggestions+json" template="' . $domain . '/api/v1/ac?s={searchTerms}&amp;scraper=' . htmlspecialchars($_GET["ac"]) . '"/>'; echo '<Url rel="suggestions" type="application/x-suggestions+json" template="' . $domain . '/api/v1/ac?s={searchTerms}&amp;scraper=' . htmlspecialchars($_GET["ac"]) . '"/>';
} }
echo '</OpenSearchDescription>'; echo '</OpenSearchDescription>';