Parent: [befebb] (diff)

Child: [893dc4] (diff)

Download this file

searchable.html    43 lines (34 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<html>
<head>
<title>Recoll searchable HTML</title>
<script language="JavaScript">
function recollsearch() {
if (navigator.appName != 'Microsoft Internet Explorer') {
var t = document.getSelection();
recoll(t);
} else {
var t = document.selection.createRange();
if (document.selection.type == 'Text' && t.text > '') {
document.selection.empty();
recoll(t.text);
}
}
}
function recoll(t) {
if (t) {
window.location.href = 'recoll://search/query?qtp=a&p=0&q=' +
encodeURIComponent(t);
}
}
</script>
</head>
<body ondblclick="recollsearch()">
<h2>A <b>Recoll</b>-searchable HTML page </h2>
<p>This is a text sample in which links have been inserted for
words, such as <a href="recoll:/system installation">system installation</a>,
which can be searched for in the whole document set by
using <a href="recoll:/recoll">recoll</a></p>
<p>Also a little bit of javascript magic can make
all words searchable (try double-clicking any word).</p>
</body>
</html>