From e9e0cf59085cb3b3d77c8a2962fd8b80ac4d0c9d Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 19 Jun 2011 15:43:41 +0000 Subject: Manual: add search box to HTML output. To allow easy searching the HTML (multi page) output add a search box that queries Google. The Google search will get restricted to the location the manual is stored. Google seems to happily accept a subfolder when specifying a domain to search. For this to work the search box has to be created dynamically with the help of a bit JavaScript. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30017 a1c6a512-1295-4272-9138-f99709370657 --- manual/gsearch.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 manual/gsearch.js (limited to 'manual/gsearch.js') diff --git a/manual/gsearch.js b/manual/gsearch.js new file mode 100644 index 0000000000..9b5e3f7aa1 --- /dev/null +++ b/manual/gsearch.js @@ -0,0 +1,11 @@ +function gsearch() { + var expr=/(.*)\/([^/]+)$/; + var loc = expr.exec(window.location)[1]; + document.getElementById("gsearch").innerHTML = '' + + '
' + + 'Search this manual ' + + '' + + '' + + '' + + '
'; +} -- cgit v1.2.3