Browse Source

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

lolcat 1 day ago
parent
commit
b014a3199d
1 changed files with 4 additions and 5 deletions
  1. 4 5
      opensearch.php

+ 4 - 5
opensearch.php

@@ -36,13 +36,12 @@ if(
 $domain = ($ssl ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"];
 
 echo
-	'<?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/">' .
+	'<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">' .
 		'<ShortName>' . htmlspecialchars(config::SERVER_NAME) . ($ssl === false ? " ({$src})" : "") . '</ShortName>' .
 		'<Description>' . htmlspecialchars(config::SERVER_SHORT_DESCRIPTION) . '</Description>' .
 		'<InputEncoding>UTF-8</InputEncoding>' .
-		'<Image width="16" height="16" type="image/x-icon">' . htmlspecialchars($domain) . '/favicon.ico</Image>' .
-		'<Url type="text/html" method="GET" template="' . htmlspecialchars($domain) . '/web?s={searchTerms}"/>';
+		'<Image width="32" height="32" type="image/x-icon">' . htmlspecialchars($domain) . '/favicon.ico</Image>' .
+		'<Url rel="results" type="text/html" method="GET" template="' . htmlspecialchars($domain) . '/web?s={searchTerms}"/>';
 
 if(
 	isset($_GET["ac"]) &&
@@ -50,7 +49,7 @@ if(
 	$_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>';