e9e0cf5908
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
11 lines
408 B
JavaScript
11 lines
408 B
JavaScript
function gsearch() {
|
|
var expr=/(.*)\/([^/]+)$/;
|
|
var loc = expr.exec(window.location)[1];
|
|
document.getElementById("gsearch").innerHTML = ''
|
|
+ '<form action="http://www.google.com/search">'
|
|
+ 'Search this manual '
|
|
+ '<input name="as_q" size="30">'
|
|
+ '<input value="Google it" type="submit">'
|
|
+ '<input type="hidden" name="as_sitesearch" value="' + loc + '">'
|
|
+ '</form>';
|
|
}
|