-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
55 lines (55 loc) · 2.08 KB
/
index.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html><meta charset="utf-8"/><title
>Retrie</title><link rel="stylesheet" href="index.css"/><link rel="stylesheet" href="../coco/doc/doc.css"/><link rel="icon" href="retrie.png"/><textarea id="words" accesskey="W"
>if is in instanceof import</textarea><div id="ctrls"
><span
>Words ↑</span><span
>Regex ↓</span><span id="buttons"
><button id="ex" accesskey="E"
>Exact</button><button id="pr" accesskey="P"
>Prefixes</button></span><label for="sep" accesskey="S"
>Seperator: <input id="sep" placeholder="\s+"/></label></div><textarea id="regex" accesskey="R"
></textarea><a href="https://github.com/satyr/retrie/"
><img alt="fork-me-on-github" id="ribbon" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"/></a><script src="retrie.js"
></script><script
>new function (){
var l, that, i, _i, _ref, _len;
for (_i = 0, _len = (_ref = document.body.getElementsByTagName('*')).length; _i < _len; ++_i) {
l = _ref[_i];
if (that = l.id) {
this[that] = l;
}
}
for (i = 0, _len = (_ref = [this['ex'], this['pr']]).length; i < _len; ++i) {
l = _ref[i];
(_fn.call(this, i, l));
}
function _fn(i, l){
var _this = this;
l.onclick = function(){
var sp, re, w;
sp = _this.sep.getAttribute('placeholder');
re = (function(){
try {
return RegExp(this.sep.value || sp);
} catch (e) {
return RegExp(this.sep.value = sp);
}
}.call(_this));
return _this.regex.value = Retrie((function(){
var _i, _ref, _len, _results = [];
for (_i = 0, _len = (_ref = this.words.value.split(re)).length; _i < _len; ++_i) {
w = _ref[_i];
if (w) {
_results.push(w);
}
}
return _results;
}.call(_this)), i);
};
}
}</script><script
>sources = ['retrie', 'index.html']</script><script src="../coco/doc/showdown.js"
></script><script src="../coco/doc/prettify.js"
></script><script src="../coco/doc/lang-co.js"
></script><script src="../coco/doc/doc.js"
></script>