improve description to add consearch to browsers
[consearch.git] / index.php
index 4ab21e656ee11c248ad7edad990230c98fd7ff06..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;
 }
 
@@ -154,6 +154,7 @@ se["gi"] = ["gg_img", "https://www.google.com/images?hl=de&safe=off&q=", "gg.png
 se["mg"] = ["metager", "https://metager.de/meta/meta.ger3?eingabe=", ""];
 se["wb"] = ["wb", "http://www.woerterbuch.info/?query=", ""];
 se["leo"] = ["leo", "https://dict.leo.org/german-english/", "leo.png"];
+se["lg"] = ["linguee", "https://www.linguee.com/search?source=auto&query=", ""]
 se["dc"] = ["dict.cc", "https://www.dict.cc/?s=", ""];
 se["gt"] = ["gg_tl", "https://translate.google.de/?hl=de&tab=wT#en|de|", "gg.png"];
 se["ud"] = ["ud", "http://www.urbandictionary.com/define.php?term=", "ud.png"];
@@ -165,6 +166,7 @@ se["dps"] = ["deb-pkg", "https://packages.debian.org/search?searchon=names&suite
 se["ups"] = ["uu-pkg", "http://packages.ubuntu.com/search?searchon=names&suite=all&section=all&keywords=", "man-u.png"];
 se["fps"] = ["fed-pkg", "https://apps.fedoraproject.org/packages/s/", ""];
 se["lps"] = ["lnxpkgs", "https://pkgs.org/download/", ""];
+se["fd"] = ["f-droid", "https://search.f-droid.org/?q=", ""];
 se["yt"] = ["youtube", "https://www.youtube.com/results?search_query=", "yt.png"];
 se["imdb"] = ["imdb", "http://www.imdb.com/find?s=all&q=", "imdb.png"];
 se["az"] = ["amazon", "https://www.amazon.de/s/?url=search-alias%3Daps&field-keywords=", "az.png"];
@@ -187,6 +189,10 @@ se["ye"] = ["you-eng", "https://youglish.com/search/", ""];
 se["ks"] = ["ks", "https://kraut.space/start?do=search&id=", "ks.png"];
 se["obi"] = ["obi", "https://www.obi.de/search/", ""];
 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 = "";
@@ -241,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
@@ -253,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>