aboutsummaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorStephen Blott2015-06-03 06:54:37 +0100
committerStephen Blott2015-06-03 06:54:40 +0100
commit3dfa2776fac56536f85e8ed196db6995468f368c (patch)
tree782a74bbdf67cc6a5b0c3f1f14e630e7efd24dbc /pages
parent11967b0bbd4842777ec881673766c8fbc24016e0 (diff)
downloadvimium-3dfa2776fac56536f85e8ed196db6995468f368c.tar.bz2
Completion page; add example DECLARATIONS to page.
Instead of just giving an example search URL, we can give the actual declaration (which the user can copy, paste and tweak).
Diffstat (limited to 'pages')
-rw-r--r--pages/completion_engines.coffee8
1 files changed, 6 insertions, 2 deletions
diff --git a/pages/completion_engines.coffee b/pages/completion_engines.coffee
index ecc55a4f..9fd5bbe0 100644
--- a/pages/completion_engines.coffee
+++ b/pages/completion_engines.coffee
@@ -17,9 +17,13 @@ DomUtils.documentReady ->
html += "</pre>"
if engine.prefix
html += "<p>This uses the general Google completion engine, but adds the prefix \"<tt>#{engine.prefix.trim()}</tt>\" to the query.</p>"
- if engine.example
+ if engine.exampleSearchUrl and engine.exampleKeyword
+ engine.exampleDescription ||= engine.constructor.name
html += "<p>"
- html += "Example search URL: \"<tt>#{engine.example}</tt>\"."
+ html += "Example:"
+ html += "<pre>"
+ html += "#{engine.exampleKeyword}: #{engine.exampleSearchUrl} #{engine.exampleDescription}"
+ html += "</pre>"
html += "</p>"
html += "</div>"