wwwjdic 13.0.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +19 -1
- data/Gemfile +1 -1
- data/README.md +79 -73
- data/Rakefile +2 -2
- data/acknowledgements.md +2 -2
- data/authors.md +2 -2
- data/copyright.md +4 -4
- data/examples/basics.rb +1 -1
- data/examples/translate.rb +1 -1
- data/examples/uri.rb +1 -1
- data/html/CHANGELOG.html +28 -7
- data/html/COPYING_md.html +7 -6
- data/html/Gemfile.html +8 -7
- data/html/Object.html +7 -4
- data/html/README_md.html +34 -47
- data/html/Rakefile.html +10 -9
- data/html/WWWJDic.html +11 -8
- data/html/WWWJDic/ParsableDuckType.html +9 -6
- data/html/WWWJDic/Parser.html +9 -6
- data/html/WWWJDic/Parsers.html +7 -4
- data/html/WWWJDic/Parsers/Dict.html +8 -5
- data/html/WWWJDic/Parsers/Display.html +8 -5
- data/html/WWWJDic/Parsers/Key.html +8 -5
- data/html/WWWJDic/Parsers/Search.html +8 -5
- data/html/WWWJDic/Parsers/Server.html +8 -5
- data/html/WWWJDic/Splitter.html +8 -5
- data/html/WWWJDic/Utils.html +8 -5
- data/html/WWWJDic/Utils/Downloader.html +7 -4
- data/html/WWWJDic/Utils/Downloader/Downloader.html +7 -4
- data/html/WWWJDic/Utils/Raisers.html +23 -20
- data/html/WWWJDic/WWWJDic.html +14 -11
- data/html/acknowledgements_md.html +9 -8
- data/html/authors_md.html +9 -8
- data/html/copyright_md.html +198 -195
- data/html/created.rid +57 -58
- data/html/css/rdoc.css +35 -6
- data/html/index.html +34 -47
- data/html/js/darkfish.js +22 -99
- data/html/js/navigation.js +4 -40
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +32 -31
- data/html/js/search_index.js +1 -1
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +6 -6
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +10 -10
- data/lib/wwwjdic.rb +4 -2
- data/lib/wwwjdic/application.rb +8 -8
- data/lib/wwwjdic/constants.rb +1 -1
- data/lib/wwwjdic/locales/de.yml +3 -1
- data/lib/wwwjdic/locales/en.yml +3 -1
- data/lib/wwwjdic/locales/es.yml +3 -1
- data/lib/wwwjdic/locales/fr.yml +3 -2
- data/lib/wwwjdic/locales/hu.yml +3 -2
- data/lib/wwwjdic/locales/it.yml +3 -2
- data/lib/wwwjdic/locales/ja.yml +3 -3
- data/lib/wwwjdic/locales/nl.yml +3 -1
- data/lib/wwwjdic/locales/ru.yml +3 -1
- data/lib/wwwjdic/locales/sl.yml +3 -1
- data/lib/wwwjdic/locales/sv.yml +3 -1
- data/lib/wwwjdic/parser.rb +3 -3
- data/lib/wwwjdic/parsers/dict.rb +2 -2
- data/lib/wwwjdic/parsers/display.rb +2 -2
- data/lib/wwwjdic/parsers/key.rb +2 -2
- data/lib/wwwjdic/parsers/search.rb +2 -2
- data/lib/wwwjdic/parsers/server.rb +2 -2
- data/lib/wwwjdic/utils/downloader.rb +2 -2
- data/lib/wwwjdic/utils/raisers.rb +4 -3
- data/lib/wwwjdic/utils/splitter.rb +2 -2
- data/lib/wwwjdic/version.rb +16 -8
- data/test/test_helper.rb +4 -1
- data/test/test_wwwjdic.rb +4 -4
- data/test/wwwjdic/locales/de.yml +1 -1
- data/test/wwwjdic/locales/en.yml +1 -1
- data/test/wwwjdic/locales/es.yml +1 -1
- data/test/wwwjdic/locales/fr.yml +1 -1
- data/test/wwwjdic/locales/hu.yml +1 -1
- data/test/wwwjdic/locales/it.yml +3 -3
- data/test/wwwjdic/locales/ja.yml +1 -1
- data/test/wwwjdic/locales/nl.yml +1 -1
- data/test/wwwjdic/locales/ru.yml +1 -1
- data/test/wwwjdic/locales/sl.yml +1 -1
- data/test/wwwjdic/locales/sv.yml +1 -1
- data/test/wwwjdic/locales/test_locales.rb +11 -11
- data/test/wwwjdic/parsers/test_dict.rb +4 -4
- data/test/wwwjdic/parsers/test_display.rb +4 -4
- data/test/wwwjdic/parsers/test_key.rb +3 -3
- data/test/wwwjdic/parsers/test_server.rb +4 -4
- data/test/wwwjdic/test_application.rb +30 -30
- data/test/wwwjdic/test_parsable_duck_type.rb +3 -3
- data/test/wwwjdic/utils/test_downloader.rb +1 -1
- data/test/wwwjdic/utils/test_raisers.rb +1 -1
- data/wwwjdic.gemspec +15 -14
- metadata +26 -28
- data/html/js/jquery.js +0 -4
- data/html/wwwjdic_gemspec.html +0 -161
data/html/created.rid
CHANGED
@@ -1,59 +1,58 @@
|
|
1
|
-
|
2
|
-
CHANGELOG
|
1
|
+
Mon, 16 Mar 2020 09:59:55 +0100
|
2
|
+
CHANGELOG Mon, 16 Mar 2020 09:25:10 +0100
|
3
3
|
COPYING.md Mon, 25 Feb 2019 15:42:16 +0100
|
4
|
-
Gemfile
|
5
|
-
README.md
|
6
|
-
Rakefile
|
7
|
-
acknowledgements.md
|
8
|
-
authors.md
|
9
|
-
copyright.md
|
10
|
-
examples/basics.rb
|
11
|
-
examples/translate.rb
|
12
|
-
examples/uri.rb
|
13
|
-
lib/wwwjdic/application.rb
|
14
|
-
lib/wwwjdic/constants.rb
|
15
|
-
lib/wwwjdic/locales/de.yml
|
16
|
-
lib/wwwjdic/locales/en.yml
|
17
|
-
lib/wwwjdic/locales/es.yml
|
18
|
-
lib/wwwjdic/locales/fr.yml
|
19
|
-
lib/wwwjdic/locales/hu.yml
|
20
|
-
lib/wwwjdic/locales/it.yml
|
21
|
-
lib/wwwjdic/locales/ja.yml
|
22
|
-
lib/wwwjdic/locales/nl.yml
|
23
|
-
lib/wwwjdic/locales/ru.yml
|
24
|
-
lib/wwwjdic/locales/sl.yml
|
25
|
-
lib/wwwjdic/locales/sv.yml
|
26
|
-
lib/wwwjdic/parser.rb
|
27
|
-
lib/wwwjdic/parsers/dict.rb
|
28
|
-
lib/wwwjdic/parsers/display.rb
|
29
|
-
lib/wwwjdic/parsers/key.rb
|
30
|
-
lib/wwwjdic/parsers/search.rb
|
31
|
-
lib/wwwjdic/parsers/server.rb
|
32
|
-
lib/wwwjdic/utils/downloader.rb
|
33
|
-
lib/wwwjdic/utils/raisers.rb
|
34
|
-
lib/wwwjdic/utils/splitter.rb
|
35
|
-
lib/wwwjdic/version.rb Thu,
|
36
|
-
lib/wwwjdic.rb
|
37
|
-
test/test_helper.rb
|
38
|
-
test/test_wwwjdic.rb
|
39
|
-
test/wwwjdic/locales/de.yml
|
40
|
-
test/wwwjdic/locales/en.yml
|
41
|
-
test/wwwjdic/locales/es.yml
|
42
|
-
test/wwwjdic/locales/fr.yml
|
43
|
-
test/wwwjdic/locales/hu.yml
|
44
|
-
test/wwwjdic/locales/it.yml
|
45
|
-
test/wwwjdic/locales/ja.yml
|
46
|
-
test/wwwjdic/locales/nl.yml
|
47
|
-
test/wwwjdic/locales/ru.yml
|
48
|
-
test/wwwjdic/locales/sl.yml
|
49
|
-
test/wwwjdic/locales/sv.yml
|
50
|
-
test/wwwjdic/locales/test_locales.rb
|
51
|
-
test/wwwjdic/parsers/test_dict.rb
|
52
|
-
test/wwwjdic/parsers/test_display.rb
|
53
|
-
test/wwwjdic/parsers/test_key.rb
|
54
|
-
test/wwwjdic/parsers/test_server.rb
|
55
|
-
test/wwwjdic/test_application.rb
|
56
|
-
test/wwwjdic/test_parsable_duck_type.rb
|
57
|
-
test/wwwjdic/utils/test_downloader.rb
|
58
|
-
test/wwwjdic/utils/test_raisers.rb
|
59
|
-
wwwjdic.gemspec Thu, 22 Aug 2019 10:05:51 +0200
|
4
|
+
Gemfile Thu, 12 Mar 2020 16:12:51 +0100
|
5
|
+
README.md Thu, 12 Mar 2020 16:19:16 +0100
|
6
|
+
Rakefile Thu, 12 Mar 2020 16:12:51 +0100
|
7
|
+
acknowledgements.md Thu, 12 Mar 2020 16:26:24 +0100
|
8
|
+
authors.md Thu, 12 Mar 2020 16:26:24 +0100
|
9
|
+
copyright.md Thu, 12 Mar 2020 16:19:16 +0100
|
10
|
+
examples/basics.rb Thu, 12 Mar 2020 16:30:01 +0100
|
11
|
+
examples/translate.rb Thu, 12 Mar 2020 16:29:27 +0100
|
12
|
+
examples/uri.rb Thu, 12 Mar 2020 16:29:14 +0100
|
13
|
+
lib/wwwjdic/application.rb Mon, 16 Mar 2020 09:35:14 +0100
|
14
|
+
lib/wwwjdic/constants.rb Thu, 12 Mar 2020 16:33:56 +0100
|
15
|
+
lib/wwwjdic/locales/de.yml Thu, 12 Mar 2020 16:40:51 +0100
|
16
|
+
lib/wwwjdic/locales/en.yml Thu, 12 Mar 2020 16:40:51 +0100
|
17
|
+
lib/wwwjdic/locales/es.yml Thu, 12 Mar 2020 16:40:51 +0100
|
18
|
+
lib/wwwjdic/locales/fr.yml Thu, 12 Mar 2020 16:40:23 +0100
|
19
|
+
lib/wwwjdic/locales/hu.yml Thu, 12 Mar 2020 16:40:23 +0100
|
20
|
+
lib/wwwjdic/locales/it.yml Thu, 12 Mar 2020 16:40:23 +0100
|
21
|
+
lib/wwwjdic/locales/ja.yml Thu, 12 Mar 2020 16:40:23 +0100
|
22
|
+
lib/wwwjdic/locales/nl.yml Thu, 12 Mar 2020 16:40:23 +0100
|
23
|
+
lib/wwwjdic/locales/ru.yml Thu, 12 Mar 2020 16:40:23 +0100
|
24
|
+
lib/wwwjdic/locales/sl.yml Thu, 12 Mar 2020 16:40:23 +0100
|
25
|
+
lib/wwwjdic/locales/sv.yml Thu, 12 Mar 2020 16:40:23 +0100
|
26
|
+
lib/wwwjdic/parser.rb Thu, 12 Mar 2020 17:23:45 +0100
|
27
|
+
lib/wwwjdic/parsers/dict.rb Thu, 12 Mar 2020 16:42:50 +0100
|
28
|
+
lib/wwwjdic/parsers/display.rb Thu, 12 Mar 2020 16:42:50 +0100
|
29
|
+
lib/wwwjdic/parsers/key.rb Thu, 12 Mar 2020 16:41:46 +0100
|
30
|
+
lib/wwwjdic/parsers/search.rb Thu, 12 Mar 2020 16:41:46 +0100
|
31
|
+
lib/wwwjdic/parsers/server.rb Thu, 12 Mar 2020 16:41:46 +0100
|
32
|
+
lib/wwwjdic/utils/downloader.rb Thu, 12 Mar 2020 16:40:22 +0100
|
33
|
+
lib/wwwjdic/utils/raisers.rb Thu, 12 Mar 2020 16:35:57 +0100
|
34
|
+
lib/wwwjdic/utils/splitter.rb Thu, 12 Mar 2020 16:35:57 +0100
|
35
|
+
lib/wwwjdic/version.rb Thu, 12 Mar 2020 16:32:01 +0100
|
36
|
+
lib/wwwjdic.rb Thu, 12 Mar 2020 16:32:01 +0100
|
37
|
+
test/test_helper.rb Mon, 16 Mar 2020 09:31:33 +0100
|
38
|
+
test/test_wwwjdic.rb Mon, 16 Mar 2020 09:31:25 +0100
|
39
|
+
test/wwwjdic/locales/de.yml Mon, 16 Mar 2020 09:33:47 +0100
|
40
|
+
test/wwwjdic/locales/en.yml Mon, 16 Mar 2020 09:33:44 +0100
|
41
|
+
test/wwwjdic/locales/es.yml Mon, 16 Mar 2020 09:33:41 +0100
|
42
|
+
test/wwwjdic/locales/fr.yml Mon, 16 Mar 2020 09:33:38 +0100
|
43
|
+
test/wwwjdic/locales/hu.yml Mon, 16 Mar 2020 09:33:35 +0100
|
44
|
+
test/wwwjdic/locales/it.yml Mon, 16 Mar 2020 09:33:31 +0100
|
45
|
+
test/wwwjdic/locales/ja.yml Mon, 16 Mar 2020 09:33:27 +0100
|
46
|
+
test/wwwjdic/locales/nl.yml Mon, 16 Mar 2020 09:33:19 +0100
|
47
|
+
test/wwwjdic/locales/ru.yml Mon, 16 Mar 2020 09:33:15 +0100
|
48
|
+
test/wwwjdic/locales/sl.yml Mon, 16 Mar 2020 09:33:11 +0100
|
49
|
+
test/wwwjdic/locales/sv.yml Mon, 16 Mar 2020 09:33:07 +0100
|
50
|
+
test/wwwjdic/locales/test_locales.rb Thu, 12 Mar 2020 17:08:09 +0100
|
51
|
+
test/wwwjdic/parsers/test_dict.rb Mon, 16 Mar 2020 09:32:49 +0100
|
52
|
+
test/wwwjdic/parsers/test_display.rb Mon, 16 Mar 2020 09:32:42 +0100
|
53
|
+
test/wwwjdic/parsers/test_key.rb Mon, 16 Mar 2020 09:32:35 +0100
|
54
|
+
test/wwwjdic/parsers/test_server.rb Mon, 16 Mar 2020 09:32:28 +0100
|
55
|
+
test/wwwjdic/test_application.rb Mon, 16 Mar 2020 09:31:51 +0100
|
56
|
+
test/wwwjdic/test_parsable_duck_type.rb Mon, 16 Mar 2020 09:32:01 +0100
|
57
|
+
test/wwwjdic/utils/test_downloader.rb Mon, 16 Mar 2020 09:32:20 +0100
|
58
|
+
test/wwwjdic/utils/test_raisers.rb Mon, 16 Mar 2020 09:32:11 +0100
|
data/html/css/rdoc.css
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
/* vim: ft=css et sw=2 ts=2 sts=2 */
|
10
10
|
/* Base Green is: #6C8C22 */
|
11
11
|
|
12
|
+
.hide { display: none !important; }
|
13
|
+
|
12
14
|
* { padding: 0; margin: 0; }
|
13
15
|
|
14
16
|
body {
|
@@ -48,6 +50,16 @@ h6:hover span {
|
|
48
50
|
display: inline;
|
49
51
|
}
|
50
52
|
|
53
|
+
h1:target,
|
54
|
+
h2:target,
|
55
|
+
h3:target,
|
56
|
+
h4:target,
|
57
|
+
h5:target,
|
58
|
+
h6:target {
|
59
|
+
margin-left: -10px;
|
60
|
+
border-left: 10px solid #f1edba;
|
61
|
+
}
|
62
|
+
|
51
63
|
:link,
|
52
64
|
:visited {
|
53
65
|
color: #6C8C22;
|
@@ -62,6 +74,9 @@ h6:hover span {
|
|
62
74
|
code,
|
63
75
|
pre {
|
64
76
|
font-family: "Source Code Pro", Monaco, monospace;
|
77
|
+
background-color: rgba(27,31,35,0.05);
|
78
|
+
padding: 0em 0.2em;
|
79
|
+
border-radius: 0.2em;
|
65
80
|
}
|
66
81
|
|
67
82
|
/* @group Generic Classes */
|
@@ -91,7 +106,7 @@ pre {
|
|
91
106
|
|
92
107
|
.missing-docs {
|
93
108
|
font-size: 120%;
|
94
|
-
background: white url(images/wrench_orange.png) no-repeat 4px center;
|
109
|
+
background: white url(../images/wrench_orange.png) no-repeat 4px center;
|
95
110
|
color: #ccc;
|
96
111
|
line-height: 2em;
|
97
112
|
border: 1px solid #d00;
|
@@ -135,11 +150,11 @@ pre {
|
|
135
150
|
.table-of-contents li .toc-toggle {
|
136
151
|
width: 16px;
|
137
152
|
height: 16px;
|
138
|
-
background: url(images/add.png) no-repeat;
|
153
|
+
background: url(../images/add.png) no-repeat;
|
139
154
|
}
|
140
155
|
|
141
156
|
.table-of-contents li .toc-toggle.open {
|
142
|
-
background: url(images/delete.png) no-repeat;
|
157
|
+
background: url(../images/delete.png) no-repeat;
|
143
158
|
}
|
144
159
|
|
145
160
|
/* @end */
|
@@ -261,8 +276,13 @@ ul.link-list .type {
|
|
261
276
|
-webkit-border-radius: 5px;
|
262
277
|
}
|
263
278
|
|
279
|
+
dl.label-list dt {
|
280
|
+
float: left;
|
281
|
+
margin-right: 1em;
|
282
|
+
}
|
283
|
+
|
264
284
|
.calls-super {
|
265
|
-
background: url(images/arrow_up.png) no-repeat right center;
|
285
|
+
background: url(../images/arrow_up.png) no-repeat right center;
|
266
286
|
}
|
267
287
|
|
268
288
|
/* @end */
|
@@ -441,7 +461,16 @@ main header h3 {
|
|
441
461
|
/* @group Method Details */
|
442
462
|
|
443
463
|
main .method-source-code {
|
444
|
-
|
464
|
+
max-height: 0;
|
465
|
+
overflow: hidden;
|
466
|
+
transition-duration: 200ms;
|
467
|
+
transition-delay: 0ms;
|
468
|
+
transition-property: all;
|
469
|
+
transition-timing-function: ease-in-out;
|
470
|
+
}
|
471
|
+
|
472
|
+
main .method-source-code.active-menu {
|
473
|
+
max-height: 100vh;
|
445
474
|
}
|
446
475
|
|
447
476
|
main .method-description .method-calls-super {
|
@@ -479,7 +508,7 @@ main .method-click-advice {
|
|
479
508
|
visibility: hidden;
|
480
509
|
padding-right: 20px;
|
481
510
|
line-height: 20px;
|
482
|
-
background: url(images/zoom.png) no-repeat right top;
|
511
|
+
background: url(../images/zoom.png) no-repeat right top;
|
483
512
|
}
|
484
513
|
main .method-heading:hover .method-click-advice {
|
485
514
|
visibility: visible;
|
data/html/index.html
CHANGED
@@ -4,15 +4,18 @@
|
|
4
4
|
<head>
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
|
7
|
-
<title>wwwjdic
|
7
|
+
<title>wwwjdic 14.0.0</title>
|
8
8
|
|
9
9
|
<script type="text/javascript">
|
10
10
|
var rdoc_rel_prefix = "./";
|
11
11
|
var index_rel_prefix = "./";
|
12
12
|
</script>
|
13
13
|
|
14
|
-
<script src="./js/
|
15
|
-
<script src="./js/
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
16
19
|
|
17
20
|
<link href="./css/fonts.css" rel="stylesheet">
|
18
21
|
<link href="./css/rdoc.css" rel="stylesheet">
|
@@ -75,8 +78,6 @@
|
|
75
78
|
|
76
79
|
<li><a href="./copyright_md.html">copyright</a>
|
77
80
|
|
78
|
-
<li><a href="./wwwjdic_gemspec.html">wwwjdic.gemspec</a>
|
79
|
-
|
80
81
|
</ul>
|
81
82
|
</div>
|
82
83
|
|
@@ -128,7 +129,7 @@
|
|
128
129
|
<!--
|
129
130
|
wwwjdic
|
130
131
|
|
131
|
-
Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
|
132
|
+
Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
|
132
133
|
|
133
134
|
This file is part of wwwjdic.
|
134
135
|
|
@@ -149,7 +150,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
149
150
|
|
150
151
|
<p><img src="https://img.shields.io/gem/v/wwwjdic.svg?style=plastic"> <img src="https://img.shields.io/gem/dt/wwwjdic.svg?style=plastic"> <img src="https://img.shields.io/gem/dtv/wwwjdic.svg?style=plastic"> <img src="https://img.shields.io/gem/rt/wwwjdic.svg?style=plastic"> <img src="https://img.shields.io/gem/rd/wwwjdic.svg?style=plastic"> <img src="https://img.shields.io/librariesio/dependent-repos/rubygems/wwwjdic.svg?style=plastic"></p>
|
151
152
|
|
152
|
-
<p>Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani</p>
|
153
|
+
<p>Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p>
|
153
154
|
|
154
155
|
<p>This file is part of wwwjdic.</p>
|
155
156
|
|
@@ -165,9 +166,11 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
165
166
|
|
166
167
|
<p><a href="WWWJDic.html"><code>WWWJDic</code></a> is an online Japanese translation server made by Jim Breen and available at <a href="http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C">www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C</a> .</p>
|
167
168
|
|
168
|
-
<p>GNU GPLv3 license; source code
|
169
|
+
<p>GNU GPLv3 license; source code available through anonymous checkout: <code>hg clone http://hg.savannah.nongnu.org/hgweb/wwwjdic/</code> or write me and I'll send it.</p>
|
170
|
+
|
171
|
+
<p>You can even decide to contribute to this little free software project by registering to Savannah and ask to be part of the 'WWWJDic' project!</p>
|
169
172
|
|
170
|
-
<p>
|
173
|
+
<p>With great contributions from: Jim Breen, 新部裕, Jon Maken.</p>
|
171
174
|
|
172
175
|
<h2 id="label-Documentation">Documentation<span><a href="#label-Documentation">¶</a> <a href="#top">↑</a></span></h2>
|
173
176
|
|
@@ -181,7 +184,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
181
184
|
|
182
185
|
<h3 id="label-Supported+Ruby+Versions+and+Implementations">Supported Ruby Versions and Implementations<span><a href="#label-Supported+Ruby+Versions+and+Implementations">¶</a> <a href="#top">↑</a></span></h3>
|
183
186
|
|
184
|
-
<p>Because <a href="WWWJDic.html"><code>WWWJDic</code></a> is pure Ruby, it should run pretty much anywhere, including Rubinius, JRuby, MacRuby, etc. Officially the support is for 2.
|
187
|
+
<p>Because <a href="WWWJDic.html"><code>WWWJDic</code></a> is pure Ruby, it should run pretty much anywhere, including Rubinius, JRuby, MacRuby, etc. Officially the support is for >= 2.7 YARV/KRI.</p>
|
185
188
|
|
186
189
|
<h3 id="label-Support">Support<span><a href="#label-Support">¶</a> <a href="#top">↑</a></span></h3>
|
187
190
|
|
@@ -203,7 +206,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
203
206
|
|
204
207
|
<h3 id="label-License">License<span><a href="#label-License">¶</a> <a href="#top">↑</a></span></h3>
|
205
208
|
|
206
|
-
<p><a href="WWWJDic.html"><code>WWWJDic</code></a> is released under GNU GPL v3 license: if you wish to contribute to <a href="WWWJDic.html"><code>WWWJDic</code></a>, you will retain your own <a href="copyright_md.html">copyright</a> but must agree to license your code under the same terms as the project itself (or any compatible license according to <a href="http://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses">GPL
|
209
|
+
<p><a href="WWWJDic.html"><code>WWWJDic</code></a> is released under GNU GPL v3 license: if you wish to contribute to <a href="WWWJDic.html"><code>WWWJDic</code></a>, you will retain your own <a href="copyright_md.html">copyright</a> but must agree to license your code under the same terms as the project itself (or any compatible license according to <a href="http://www.gnu.org/licenses/license-list.en.html#GPLCompatibleLicenses">GPL-Compatible Free Software Licenses</a>).</p>
|
207
210
|
|
208
211
|
<h3 id="label-Links">Links<span><a href="#label-Links">¶</a> <a href="#top">↑</a></span></h3>
|
209
212
|
|
@@ -240,14 +243,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
240
243
|
|
241
244
|
<h3 id="label-Usage+Examples">Usage Examples<span><a href="#label-Usage+Examples">¶</a> <a href="#top">↑</a></span></h3>
|
242
245
|
|
243
|
-
<p>See <code>examples</code> folder. To run the examples just run <code>ruby examples/</code>{EXAMPLE_NAME}<code>.rb</code>. Running the examples you'll see both the example description and correct code usage to perform such action. Here below are listed the currently available examples
|
244
|
-
<ul><li>
|
245
|
-
<p>The <code>basics.rb</code> example (run <code>ruby examples/basics.rb</code>) shows how to initialize and use a <a href="WWWJDic.html"><code>WWWJDic</code></a> object through the <code>breener</code> factory method;</p>
|
246
|
-
</li><li>
|
247
|
-
<p>The <code>uri.rb</code> example (run <code>ruby examples/uri.rb</code>) shows how to ask for translation URI at <a href="WWWJDic.html"><code>WWWJDic</code></a>, with all available options and configurations.</p>
|
248
|
-
</li><li>
|
249
|
-
<p>The <code>translate.rb</code> example (run <code>ruby examples/translate.rb</code>) shows how to ask for an actual translation through <a href="WWWJDic.html"><code>WWWJDic</code></a> Backdoor/API, with all available options and configurations. It will also show how to download such translation;</p>
|
250
|
-
</li></ul>
|
246
|
+
<p>See <code>examples</code> folder. To run the examples just run <code>ruby examples/</code>{EXAMPLE_NAME}<code>.rb</code>. Running the examples you'll see both the example description and correct code usage to perform such action. Here below are listed the currently available examples: * The <code>basics.rb</code> example (run <code>ruby examples/basics.rb</code>) shows how to initialize and use a <a href="WWWJDic.html"><code>WWWJDic</code></a> object through the <code>breener</code> factory method; * The <code>uri.rb</code> example (run <code>ruby examples/uri.rb</code>) shows how to ask for translation URI at <a href="WWWJDic.html"><code>WWWJDic</code></a>, with all available options and configurations. * The <code>translate.rb</code> example (run <code>ruby examples/translate.rb</code>) shows how to ask for an actual translation through <a href="WWWJDic.html"><code>WWWJDic</code></a> Backdoor/API, with all available options and configurations. It will also show how to download such translation;</p>
|
251
247
|
|
252
248
|
<p>Using this API is pretty simple. First, get a reference to the <a href="WWWJDic.html"><code>WWWJDic</code></a> object, through its factory method with</p>
|
253
249
|
|
@@ -258,25 +254,23 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
258
254
|
|
259
255
|
<h4 id="label-Parameters">Parameters<span><a href="#label-Parameters">¶</a> <a href="#top">↑</a></span></h4>
|
260
256
|
|
261
|
-
<p>You can then start possibly manipulating some basic parameters that can be set and read from the API. These are not mandatory settings, but are useful whether you'll use your <code>my_wwwjdic</code> object for further similar requests: settings these values internally will save you type more parameters in the request, leaving only the word to search/translate as needed
|
262
|
-
<ul><li>
|
263
|
-
<p>the <code>server</code> name/URL to use:</p>
|
257
|
+
<p>You can then start possibly manipulating some basic parameters that can be set and read from the API. These are not mandatory settings, but are useful whether you'll use your <code>my_wwwjdic</code> object for further similar requests: settings these values internally will save you type more parameters in the request, leaving only the word to search/translate as needed. * the <code>server</code> name/URL to use:</p>
|
264
258
|
|
265
|
-
<pre class="ruby"
|
266
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
259
|
+
<pre class="ruby"> <span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> <span class="ruby-comment"># returns the default server URL http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?</span>
|
260
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
267
261
|
|
268
|
-
<span class="ruby-comment"># this below is (again) the default configured server</span>
|
269
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> = <span class="ruby-value">:edrdg</span>
|
270
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> <span class="ruby-comment"># returns the URL http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?</span>
|
271
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
262
|
+
<span class="ruby-comment"># this below is (again) the default configured server</span>
|
263
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> = <span class="ruby-value">:edrdg</span>
|
264
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> <span class="ruby-comment"># returns the URL http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic.cgi?</span>
|
265
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
272
266
|
|
273
|
-
<span class="ruby-comment"># this is the additional server</span>
|
274
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> = <span class="ruby-value">:monash</span>
|
275
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> <span class="ruby-comment"># returns the URL http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?</span>
|
276
|
-
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
267
|
+
<span class="ruby-comment"># this is the additional server</span>
|
268
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> = <span class="ruby-value">:monash</span>
|
269
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">server</span> <span class="ruby-comment"># returns the URL http://www.csse.monash.edu.au/~jwb/cgi-bin/wwwjdic.cgi?</span>
|
270
|
+
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment"># contains the URL above</span>
|
277
271
|
</pre>
|
278
|
-
|
279
|
-
<p>the default reference <code>dictionary</code> to use for translations.
|
272
|
+
<ul><li>
|
273
|
+
<p>the default reference <code>dictionary</code> to use for translations. All currently available dictionaries strings can be used: <code>'1'</code>, <code>'2'</code>, <code>'3'</code>, <code>'4'</code>, <code>'5'</code>, <code>'6'</code>, <code>'7'</code>, <code>'8'</code>, <code>'9'</code>, <code>'A'</code>, <code>'B'</code>, <code>'C'</code>, <code>'D'</code>, <code>'E'</code>, <code>'F'</code>, <code>'G'</code>, <code>'H'</code>, <code>'I'</code>, <code>'J'</code>, <code>'K'</code>, <code>'L'</code>, <code>'M'</code>, <code>'N'</code>, <code>'O'</code>, <code>'P'</code>, <code>'Q'</code> and <code>'R'</code>. You can even use the whole (exact) dictionary strings as listed in the <a href="WWWJDic.html"><code>WWWJDic</code></a> HTML source code: <code>'Jpn-Eng General (EDICT)'</code>, <code>'Japanese Names (ENAMDICT)'</code>, <code>'Computing/Telecomms'</code>, <code>'Life Sciences/Bio-Med'</code>, <code>'Legal Terms'</code>, <code>'Finance/Marketing'</code>, <code>'Buddhism'</code>, <code>'Miscellaneous'</code>, <code>'Special Text-glossing'</code>, <code>'Engineering/Science'</code>, <code>'Linguistics'</code>, <code>'River & Water Systems'</code>, <code>'Automobile Industry'</code>, <code>'Japanese Wordnet'</code>, <code>'Work-in-progress File'</code>, <code>'Japanese-German (WaDoku)'</code>, <code>'Japanese-French'</code>, <code>'Japanese-Russian'</code>, <code>'Japanese-Swedish'</code>, <code>'Japanese-Hungarian'</code>, <code>'Japanese-Spanish'</code>, <code>'Japanese-Dutch'</code>, <code>'Japanese-Slovenian'</code>, <code>'Japanese-Italian'</code>, <code>'Untranslated'</code>, <code>'Combined Jpn-Eng'</code>, <code>'Expanded Text-glossing'</code>.</p>
|
280
274
|
|
281
275
|
<pre class="ruby"><span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">dictionary</span> <span class="ruby-comment"># returns 0 as default, if not set</span>
|
282
276
|
|
@@ -284,7 +278,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
284
278
|
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">dictionary</span> <span class="ruby-comment"># returns the string '7'</span>
|
285
279
|
</pre>
|
286
280
|
</li><li>
|
287
|
-
<p>Then you can obviously ask for a translation reference URL.
|
281
|
+
<p>Then you can obviously ask for a translation reference URL. Basic examples:</p>
|
288
282
|
|
289
283
|
<pre class="ruby"><span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">uri</span> <span class="ruby-string">'word'</span> <span class="ruby-comment"># this return the URL for translation of 'word', with normal display format</span>
|
290
284
|
|
@@ -314,17 +308,11 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
314
308
|
'message' : possible error message or result (extracted from <p>MESSAGE\n raw display format
|
315
309
|
}</pre>
|
316
310
|
</li><li>
|
317
|
-
<p>Now let's come to the second parameter of the methods above (set to <code>nil</code> in the examples), the arguments for the translation.
|
318
|
-
|
319
|
-
<p>Valid parameters, and their values are:</p>
|
320
|
-
<ul><li>
|
321
|
-
<p><code>dict</code> parameter allows both numbers and (exact) strings to select dictionaries: <code>'1'</code>, <code>'2'</code>, <code>'3'</code>, <code>'4'</code>, <code>'5'</code>, <code>'6'</code>, <code>'7'</code>, <code>'8'</code>, <code>'9'</code>, <code>'A'</code>, <code>'B'</code>, <code>'C'</code>, <code>'D'</code>, <code>'E'</code>, <code>'F'</code>, <code>'G'</code>, <code>'H'</code>, <code>'I'</code>, <code>'J'</code>, <code>'K'</code>, <code>'L'</code>, <code>'M'</code>, <code>'N'</code>, <code>'O'</code>, <code>'P'</code>, <code>'Q'</code>, and <code>'R'</code>, together with the full (exact) strings <code>'Jpn-Eng General (EDICT)'</code>, <code>'Japanese Names (ENAMDICT)'</code>, <code>'Computing/Telecomms'</code>, <code>'Life Sciences/Bio-Med'</code>, <code>'Legal Terms'</code>, <code>'Finance/Marketing'</code>, <code>'Buddhism'</code>, <code>'Miscellaneous'</code>, <code>'Special Text-glossing'</code>, <code>'Engineering/Science'</code>, <code>'Linguistics'</code>, <code>'River & Water Systems'</code>, <code>'Automobile Industry'</code>, <code>'Japanese Wordnet'</code>, <code>'Work-in-progress File'</code>, <code>'Japanese-German (WaDoku)'</code>, <code>'Japanese-French'</code>, <code>'Japanese-Russian'</code>, <code>'Japanese-Swedish'</code>, <code>'Japanese-Hungarian'</code>, <code>'Japanese-Spanish'</code>, <code>'Japanese-Dutch'</code>, <code>'Japanese-Slovenian'</code>, <code>'Japanese-Italian'</code>, <code>'Untranslated'</code>, <code>'Combined Jpn-Eng'</code> and <code>'Expanded Text-glossing'</code>.</p>
|
322
|
-
</li><li>
|
323
|
-
<p><code>display</code> parameter to select the final format of the referred HTML page (either regular HTML or raw): <code>:regular</code>, <code>:raw</code>.</p>
|
324
|
-
</li><li>
|
325
|
-
<p><code>server</code> allows the user to select from the default URL (at Electronic Dictionaries R&D Group) or the Monash university URL: <code>:edrdg</code>, <code>:monash</code>.</p>
|
311
|
+
<p>Now let's come to the second parameter of the methods above (set to <code>nil</code> in the examples), the arguments for the translation. The default is to translate to/from English/Japanese with normal display layout and no other specificities, except that the API automatically identifies Japanese or English and manages the romaji and so on. The returned URL is the default EDR&DG one. What if the user wants to customize something? The <code>args</code>, second parameter of all those methods above, is a dictionary (hash map) that allows to specify which parameters and to which values they shall be set.</p>
|
326
312
|
</li></ul>
|
327
313
|
|
314
|
+
<p>Valid parameters, and their values are: * <code>dict</code> parameter allows both numbers and (exact) strings to select dictionaries: <code>'1'</code>, <code>'2'</code>, <code>'3'</code>, <code>'4'</code>, <code>'5'</code>, <code>'6'</code>, <code>'7'</code>, <code>'8'</code>, <code>'9'</code>, <code>'A'</code>, <code>'B'</code>, <code>'C'</code>, <code>'D'</code>, <code>'E'</code>, <code>'F'</code>, <code>'G'</code>, <code>'H'</code>, <code>'I'</code>, <code>'J'</code>, <code>'K'</code>, <code>'L'</code>, <code>'M'</code>, <code>'N'</code>, <code>'O'</code>, <code>'P'</code>, <code>'Q'</code>, and <code>'R'</code>, together with the full (exact) strings <code>'Jpn-Eng General (EDICT)'</code>, <code>'Japanese Names (ENAMDICT)'</code>, <code>'Computing/Telecomms'</code>, <code>'Life Sciences/Bio-Med'</code>, <code>'Legal Terms'</code>, <code>'Finance/Marketing'</code>, <code>'Buddhism'</code>, <code>'Miscellaneous'</code>, <code>'Special Text-glossing'</code>, <code>'Engineering/Science'</code>, <code>'Linguistics'</code>, <code>'River & Water Systems'</code>, <code>'Automobile Industry'</code>, <code>'Japanese Wordnet'</code>, <code>'Work-in-progress File'</code>, <code>'Japanese-German (WaDoku)'</code>, <code>'Japanese-French'</code>, <code>'Japanese-Russian'</code>, <code>'Japanese-Swedish'</code>, <code>'Japanese-Hungarian'</code>, <code>'Japanese-Spanish'</code>, <code>'Japanese-Dutch'</code>, <code>'Japanese-Slovenian'</code>, <code>'Japanese-Italian'</code>, <code>'Untranslated'</code>, <code>'Combined Jpn-Eng'</code> and <code>'Expanded Text-glossing'</code>. * <code>display</code> parameter to select the final format of the referred HTML page (either regular HTML or raw): <code>:regular</code>, <code>:raw</code>. * <code>server</code> allows the user to select from the default URL (at Electronic Dictionaries R&D Group) or the Monash university URL: <code>:edrdg</code>, <code>:monash</code>.</p>
|
315
|
+
|
328
316
|
<p>Some examples of these parameters' usage:</p>
|
329
317
|
|
330
318
|
<pre class="ruby"> <span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">translate</span> <span class="ruby-string">'sprache'</span>, <span class="ruby-value">dict:</span> <span class="ruby-string">'F'</span> <span class="ruby-comment"># this translates using the 'F' dictionary, that is the German one</span>
|
@@ -335,12 +323,11 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
335
323
|
|
336
324
|
<span class="ruby-identifier">my_wwwjdic</span>.<span class="ruby-identifier">uri</span> <span class="ruby-string">'sprache'</span>, <span class="ruby-value">dict:</span> <span class="ruby-string">'F'</span>, <span class="ruby-value">display:</span> <span class="ruby-identifier">raw</span> <span class="ruby-comment"># same as above</span>
|
337
325
|
</pre>
|
338
|
-
</li></ul>
|
339
326
|
<hr>
|
340
327
|
|
341
328
|
<p>wwwjdic</p>
|
342
329
|
|
343
|
-
<p>Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani</p>
|
330
|
+
<p>Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani</p>
|
344
331
|
|
345
332
|
<p>This file is part of wwwjdic.</p>
|
346
333
|
|
@@ -357,7 +344,7 @@ with wwwjdic. If not, see <http://www.gnu.org/licenses/>.
|
|
357
344
|
|
358
345
|
<footer id="validator-badges" role="contentinfo">
|
359
346
|
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
360
|
-
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.
|
347
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
361
348
|
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
362
349
|
</footer>
|
363
350
|
|
data/html/js/darkfish.js
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
*/
|
9
9
|
|
10
10
|
/* Provide console simulation for firebug-less environments */
|
11
|
+
/*
|
11
12
|
if (!("console" in window) || !("firebug" in console)) {
|
12
13
|
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
14
|
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
@@ -16,41 +17,35 @@ if (!("console" in window) || !("firebug" in console)) {
|
|
16
17
|
for (var i = 0; i < names.length; ++i)
|
17
18
|
window.console[names[i]] = function() {};
|
18
19
|
};
|
19
|
-
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Unwrap the first element that matches the given @expr@ from the targets and return them.
|
23
|
-
*/
|
24
|
-
$.fn.unwrap = function( expr ) {
|
25
|
-
return this.each( function() {
|
26
|
-
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
|
-
});
|
28
|
-
};
|
20
|
+
*/
|
29
21
|
|
30
22
|
|
31
23
|
function showSource( e ) {
|
32
24
|
var target = e.target;
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
25
|
+
while (!target.classList.contains('method-detail')) {
|
26
|
+
target = target.parentNode;
|
27
|
+
}
|
28
|
+
if (typeof target !== "undefined" && target !== null) {
|
29
|
+
target = target.querySelector('.method-source-code');
|
30
|
+
}
|
31
|
+
if (typeof target !== "undefined" && target !== null) {
|
32
|
+
target.classList.toggle('active-menu')
|
33
|
+
}
|
41
34
|
};
|
42
35
|
|
43
36
|
function hookSourceViews() {
|
44
|
-
|
37
|
+
document.querySelectorAll('.method-heading').forEach(function (codeObject) {
|
38
|
+
codeObject.addEventListener('click', showSource);
|
39
|
+
});
|
45
40
|
};
|
46
41
|
|
47
42
|
function hookSearch() {
|
48
|
-
var input =
|
49
|
-
var result =
|
50
|
-
|
43
|
+
var input = document.querySelector('#search-field');
|
44
|
+
var result = document.querySelector('#search-results');
|
45
|
+
result.classList.remove("initially-hidden");
|
51
46
|
|
52
|
-
var search_section =
|
53
|
-
|
47
|
+
var search_section = document.querySelector('#search-section');
|
48
|
+
search_section.classList.remove("initially-hidden");
|
54
49
|
|
55
50
|
var search = new Search(search_data, input, result);
|
56
51
|
|
@@ -77,85 +72,13 @@ function hookSearch() {
|
|
77
72
|
}
|
78
73
|
|
79
74
|
search.select = function(result) {
|
80
|
-
|
81
|
-
window.location.href = result_element.firstChild.firstChild.href;
|
75
|
+
window.location.href = result.firstChild.firstChild.href;
|
82
76
|
}
|
83
77
|
|
84
78
|
search.scrollIntoView = search.scrollInWindow;
|
85
79
|
};
|
86
80
|
|
87
|
-
function
|
88
|
-
console.debug( "Highlighting target '%s'.", anchor );
|
89
|
-
|
90
|
-
$("a[name]").each( function() {
|
91
|
-
if ( $(this).attr("name") == anchor ) {
|
92
|
-
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
93
|
-
console.debug( "Wrapping the target-section" );
|
94
|
-
$('div.method-detail').unwrap( 'div.target-section' );
|
95
|
-
$(this).parent().wrap( '<div class="target-section"></div>' );
|
96
|
-
} else {
|
97
|
-
console.debug( "Already wrapped." );
|
98
|
-
}
|
99
|
-
}
|
100
|
-
});
|
101
|
-
};
|
102
|
-
|
103
|
-
function highlightLocationTarget() {
|
104
|
-
console.debug( "Location hash: %s", window.location.hash );
|
105
|
-
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
106
|
-
|
107
|
-
var anchor = window.location.hash.substring(1);
|
108
|
-
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
109
|
-
|
110
|
-
highlightTarget( anchor );
|
111
|
-
};
|
112
|
-
|
113
|
-
function highlightClickTarget( event ) {
|
114
|
-
console.debug( "Highlighting click target for event %o", event.target );
|
115
|
-
try {
|
116
|
-
var anchor = $(event.target).attr( 'href' ).substring(1);
|
117
|
-
console.debug( "Found target anchor: %s", anchor );
|
118
|
-
highlightTarget( anchor );
|
119
|
-
} catch ( err ) {
|
120
|
-
console.error( "Exception while highlighting: %o", err );
|
121
|
-
};
|
122
|
-
};
|
123
|
-
|
124
|
-
function loadAsync(path, success, prefix) {
|
125
|
-
$.ajax({
|
126
|
-
url: prefix + path,
|
127
|
-
dataType: 'script',
|
128
|
-
success: success,
|
129
|
-
cache: true
|
130
|
-
});
|
131
|
-
};
|
132
|
-
|
133
|
-
$(document).ready( function() {
|
81
|
+
document.addEventListener('DOMContentLoaded', function() {
|
134
82
|
hookSourceViews();
|
135
|
-
|
136
|
-
$('ul.link-list a').bind( "click", highlightClickTarget );
|
137
|
-
|
138
|
-
var search_scripts_loaded = {
|
139
|
-
navigation_loaded: false,
|
140
|
-
search_loaded: false,
|
141
|
-
search_index_loaded: false,
|
142
|
-
searcher_loaded: false,
|
143
|
-
}
|
144
|
-
|
145
|
-
var search_success_function = function(variable) {
|
146
|
-
return (function (data, status, xhr) {
|
147
|
-
search_scripts_loaded[variable] = true;
|
148
|
-
|
149
|
-
if (search_scripts_loaded['navigation_loaded'] == true &&
|
150
|
-
search_scripts_loaded['search_loaded'] == true &&
|
151
|
-
search_scripts_loaded['search_index_loaded'] == true &&
|
152
|
-
search_scripts_loaded['searcher_loaded'] == true)
|
153
|
-
hookSearch();
|
154
|
-
});
|
155
|
-
}
|
156
|
-
|
157
|
-
loadAsync('js/navigation.js', search_success_function('navigation_loaded'), rdoc_rel_prefix);
|
158
|
-
loadAsync('js/search.js', search_success_function('search_loaded'), rdoc_rel_prefix);
|
159
|
-
loadAsync('js/search_index.js', search_success_function('search_index_loaded'), index_rel_prefix);
|
160
|
-
loadAsync('js/searcher.js', search_success_function('searcher_loaded'), rdoc_rel_prefix);
|
83
|
+
hookSearch();
|
161
84
|
});
|