projects
/
consearch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
427f623
)
only include the opensearchdescription link in the html head on request
author
Felix Kästner
<git@fpunktk.de>
Tue, 30 Jun 2015 16:31:31 +0000
(18:31 +0200)
committer
Felix Kästner
<git@fpunktk.de>
Tue, 30 Jun 2015 16:31:31 +0000
(18:31 +0200)
index.php
patch
|
blob
|
history
diff --git
a/index.php
b/index.php
index 0eff2c189714a3319ddabe8bf4ad78511faf4eb7..bc0de0c81c900972f6ca135532cdf4eea0f3f090 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-43,7
+43,20
@@
if ( isset($_GET['get']) and $_GET['get'] === "opensearchdescription" ) {
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>consearch</title>
<link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAACMuuz63rNKAAAAK0lEQVQI12P4/58BiM4cZ9gdDUVnboNE/n8Hoc6JDLvLGLrLGF4DyWlAcQBYKBgvsgbJOAAAAABJRU5ErkJggg==" type="image/png">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>consearch</title>
<link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAACMuuz63rNKAAAAK0lEQVQI12P4/58BiM4cZ9gdDUVnboNE/n8Hoc6JDLvLGLrLGF4DyWlAcQBYKBgvsgbJOAAAAABJRU5ErkJggg==" type="image/png">
-<link rel="search" type="application/opensearchdescription+xml" href="index.php?get=opensearchdescription<?php if ( $dse ) { echo "&dse=$dse"; } ?>" title="consearch<?php if ( $dse ) { echo " ($dse)"; } ?>">
+<?php
+if ( isset($_GET['include']) and $_GET['include'] == "opensearchdescriptionlink" ) {
+ echo '<link rel="search" type="application/opensearchdescription+xml" href="index.php?get=opensearchdescription';
+ if ( $dse ) {
+ echo "&dse=$dse";
+ }
+ echo '" title="consearch';
+ if ( $dse ) {
+ echo " ($dse)";
+ }
+ echo '">';
+ echo "\n";
+}
+?>
<style type="text/css">
* {
<style type="text/css">
* {
@@
-213,6
+226,10
@@
please enable javascript
<div id="searchbuttons">
</div>
<div id="searchbuttons">
</div>
+<p>
+<a href="?include=opensearchdescriptionlink">add to browser</a>
+</p>
+
<p>
<a href="https://github.com/fpunktk/consearch">about</a>
</p>
<p>
<a href="https://github.com/fpunktk/consearch">about</a>
</p>