From 43adcbeee9d4a1ac63f0e0ae93c1aacd6bbb58c2 Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 26 Aug 2016 17:42:54 +0200 Subject: [PATCH] [search] improved button for geolocation (now an actual button) --- code/search.js | 4 ++-- main.js | 2 +- style.css | 16 +++++++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/code/search.js b/code/search.js index 120ce055..5fa006fe 100644 --- a/code/search.js +++ b/code/search.js @@ -7,8 +7,8 @@ addHook('search', function(query) {}); `query` is an object with the following members: - `term` is the term for which the user has searched -- `confirmed` is a boolean indicating if the user has pressed enter after searching. You should not search online or - heavy processing unless the user has confirmed the search term +- `confirmed` is a boolean indicating if the user has pressed enter after searching. You should not search online or + do heavy processing unless the user has confirmed the search term - `addResult(result)` can be called to add a result to the query. `result` may have the following members (`title` is required, as well as one of `position` and `bounds`): diff --git a/main.js b/main.js index 408ad413..9f656419 100644 --- a/main.js +++ b/main.js @@ -84,7 +84,7 @@ document.getElementsByTagName('body')[0].innerHTML = '' + '
t
' + '
 loading global control stats
' + '
' - + ' ' + + ' ' + ' ' + '
' + '
' diff --git a/style.css b/style.css index 3797ebc8..550b0db6 100644 --- a/style.css +++ b/style.css @@ -511,9 +511,19 @@ input[type="search"], input[type="url"] { } #buttongeolocation { position: absolute; - top: 2px; - right: 2px; - cursor: pointer; + right: 0; + top: 0; + margin: 0; + border: 0 none transparent; + padding: 0 2px 0 0; + height: 100%; + background-color: transparent; +} +#buttongeolocation:focus { + outline: 1px dotted #ffce00; +} +#buttongeolocation img { + display: block; } #searchwrapper h3 { font-size: 1em;