improve description to add consearch to browsers
[consearch.git] / index.php
index 95c2f8937adbfc8e6f78c3ddce01faf5df6e25dd..6314d36febdea4b82aeca0e5d9a0d05243f903b0 100644 (file)
--- a/index.php
+++ b/index.php
@@ -38,8 +38,8 @@ if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) {
     if ( $dse ) { echo "?dse=$dse"; }
     echo '#{searchTerms}"></Url>
 <Image height="16" width="16" type="image/png">' . "$consearch_base_url" . 'consearch.png</Image>
-</OpenSearchDescription>';
-    
+</OpenSearchDescription>
+';
     exit;
 }
 
@@ -192,6 +192,7 @@ se["ikea"] = ["ikea", "https://www.ikea.com/de/de/search/?query=", ""];
 se["it"] = ["i-tanke", "https://ich-tanke.de/suche/?q=", ""]
 se["ct"] = ["clv-tkn", "https://www.clever-tanken.de/tankstelle_liste?spritsorte=7&r=10&ort=", ""]
 se["tp"] = ["tankstp", "https://www.tankstellenpreise.de/suche.html?sorte=2&u=10&s=1&o=", ""]
+se["ost"] = ["ost", "https://www.opensubtitles.org/en/search2/sublanguageid-eng/moviename-", ""];
 
 function display_searchbuttons() {
     document.getElementById("searchbuttons").innerHTML = "";
@@ -246,9 +247,7 @@ if ( $dse ) {
 <h1><a href="./"><?php echo "$consearch_base_url";?></a></h1>
 
 <noscript>
-<p style="color: red; font-size: 200%; font-weight: bold;">
-please enable javascript
-</p>
+<p style="color: red; font-size: 200%; font-weight: bold;">please enable javascript</p>
 </noscript>
 
 <?php
@@ -258,36 +257,37 @@ if ( $browserintegration ) {
 }
 ?>
 
-<div>
-<label><input id="querystring" type="text"></label>
-</div>
+<div><label><input id="querystring" type="text"></label></div>
 
-<div id="searchbuttons">
-</div>
+<div id="searchbuttons"></div>
 
-<p>
-<a href="?include=browserintegration">add to browser</a>
-</p>
+<p><a href="?include=browserintegration">add to browser</a></p>
 
 <?php
 if ( $browserintegration ) {
     echo "</div>
 
-<p>
-Now add $consearch_name to your browser. In firefox this is done via the search bar or the ⋯-button in the address bar. If this does not work then $consearch_name can be added via the following form (right-click the input and select \"Add a Keyword for this Search...\"), but this would send all queries to the server and is not recommended.
-</p>
-
-<form method=\"GET\" action=\"./\">\n";
-    if ( $dse ) { echo "<input type=\"hidden\" name=\"dse\" value=\"$dse\">\n"; }
-    echo '<input type="text" name="consearchterm" value="">
-</form>
+<div style='text-align: left;'>
+<p>Add $consearch_name to your browser:</p>
+<ul style='margin: 0.5ex 2ex'>
+<li>In firefox desktop this is done via the search bar or the ⋯-button in the address bar.</li>
+<li>In firefox for android: Go to settings → search → add search engine → other, add a name (like $consearch_name) and the url '$consearch_url#%s'</li>
+<li>
+    If this does not work then $consearch_name can perhaps be added via the following form (right-click the input and select 'Add a Keyword for this Search...'), but this will send all queries to the server and is therefore not recommended.
+    <form method=\"GET\" action=\"./\">";
+    if ( $dse ) { echo "
+        <input type=\"hidden\" name=\"dse\" value=\"$dse\">"; }
+        echo '
+        <input type="text" name="consearchterm" value="">
+    </form>
+</li>
+</ul>
+</div>
 ';
 }
 ?>
 
-<p>
-<a href="https://fpunktk.de/gitweb/?p=consearch.git;a=summary">about</a> | <a href="https://fpunktk.de/#kontakt">contact</a>
-</p>
+<p><a href="https://fpunktk.de/gitweb/?p=consearch.git;a=summary">about</a> | <a href="https://fpunktk.de/#kontakt">contact</a></p>
 
 </body>
 </html>