-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
128 lines (118 loc) · 3.9 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!doctype html>
<html>
<head>
<title>Welcome to the crew!</title>
<script src="scripts/libs/jquery.js"></script>
<script src="scripts/common.js"></script>
<script src="scripts/libs/ace.js"></script>
<script src="scripts/history.js"></script>
<script src="scripts/complex-expr.js"></script>
<script src="scripts/parser.js"></script>
<script src="scripts/qnav.js"></script>
<link href="main.css" rel="stylesheet" />
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>⚓ Quick Navigation Club</h1>
<input id="editScriptBtn" class="btn" type="button" value="Edit Script" onclick="onEditScript()" />
<div id="scriptEditButtons">
<input id="cancelBtn" class="btn" type="button" value="Cancel" onclick="onCancel()" />
<input id="saveScriptBtn" type="button" class="btn" value="Save" onclick="onSaveScript()" />
</div>
</div>
<div id="content">
<div id="treeWrapper">
<div id="qnav-url"></div>
<div>
<div id="passedElements"></div>
<div id="possibleElements"></div>
</div>
<div>
<input id="qnav-input" type="text" autocomplete="off" oninput="ontype(this.value)" />
<div id="ribbon"></div>
</div>
</div>
<div id="scriptWrapper" style="display: none">
<div id="script">
-> protocol = 'https'
-> #http = { protocol = 'http' }
-> #h = { host = _ }
'$news'
'$yandex' -> host = 'news.yandex.ru'
'$bbc' -> host = 'bbc.com'
'$cnn' -> host = 'cnn.com'
// Music
'$music'
'$groove' -> { #http(); host = 'groovemp3.com' }
'$artist' -> path = 'artist'
freetype -> path /= _
'$vk' -> { host = 'vk.com'; path = 'audio' }
freetype -> param('q', _)
// Instagram
'$instagram' -> host = 'instagram.com'
'by $nickname'
freetype -> path = _
'by $tag' -> path = 'explore/tags'
freetype -> path /= _
'$wikipedia' -> { host = '{lang}.wikipedia.org'; lang = 'en' }
and
'$language'
'$russian' -> lang = 'ru'
'$english' -> lang = 'en'
'$term'
-> path = 'wiki'
freetype(';') -> path /= replace(_, ' ', '_')
'$search'
freetype(';') -> { path = 'w/index.php'; param('search', _) }
then
'params'
-> host = replace(host, '{lang}', lang)
'$search'
'$images'
'at $google' -> { host = 'google.com'; param('tbm', 'isch'); param('sa', 'X') }
freetype -> { path = 'search'; param('q', _) }
'at $google' -> host = 'google.com'
freetype -> { path = 'search'; param('q', _) }
'at $yandex' -> host = 'yandex.ru'
freetype -> { path = 'search'; }
'at $duckduckgo' -> host = 'duckduckgo.com'
freetype -> param('q', _)
'at stack$overflow' -> { #http(); host = 'stackoverflow.com' }
freetype -> { path = 'search'; param('q', _) }
// Google Translate
// tgegenau
'$translate' -> host = 'translate.google.com'
or
'from $russian' -> anchor = 'ru'
'from $english' -> anchor = 'en'
'from $spanish' -> anchor = 'es'
'from $german' -> anchor = 'de'
'from $french' -> anchor = 'fr'
'$autodetect' -> anchor = 'auto'
then
or
'from $russian' -> anchor /= 'ru'
'from $english' -> anchor /= 'en'
'from $spanish' -> anchor /= 'es'
'from $german' -> anchor /= 'de'
'from $french' -> anchor /= 'fr'
then
freetype -> anchor /= _
freetype -> { anchor = 'en'; anchor /= 'ru'; anchor /= _}
'o$xford dictionary' -> { host = 'en.oxforddictionaries.com'; path = 'definition' }
freetype -> path /= _
'google' -> { host = 'google.com'; path = 'search' }
freetype -> param('q', _)
</div>
</div>
</div>
<div id="footer">
<span>About</span>
<span>GitHub</span>
<span>Language Reference</span>
</div>
</div>
</body>
</html>