mega-max-hub 0.0.1
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 +7 -0
- data/mega-max-hub.gemspec +11 -0
- data/rdoc-8.0.0/CONTRIBUTING.md +195 -0
- data/rdoc-8.0.0/CVE-2013-0256.rdoc +49 -0
- data/rdoc-8.0.0/History.rdoc +1668 -0
- data/rdoc-8.0.0/LEGAL.rdoc +56 -0
- data/rdoc-8.0.0/LICENSE.rdoc +63 -0
- data/rdoc-8.0.0/README.md +236 -0
- data/rdoc-8.0.0/RI.md +842 -0
- data/rdoc-8.0.0/TODO.rdoc +60 -0
- data/rdoc-8.0.0/doc/markup_reference/markdown.md +659 -0
- data/rdoc-8.0.0/doc/markup_reference/rdoc.rdoc +1169 -0
- data/rdoc-8.0.0/exe/rdoc +43 -0
- data/rdoc-8.0.0/exe/ri +12 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/alias.rb +98 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/any_method.rb +387 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/attr.rb +178 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/class_module.rb +969 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/constant.rb +221 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context/section.rb +182 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/context.rb +1238 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/extend.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/include.rb +9 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/method_attr.rb +417 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/mixin.rb +123 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_class.rb +92 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/normal_module.rb +73 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/require.rb +51 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/single_class.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/code_object/top_level.rb +286 -0
- data/rdoc-8.0.0/lib/rdoc/code_object.rb +393 -0
- data/rdoc-8.0.0/lib/rdoc/code_objects.rb +5 -0
- data/rdoc-8.0.0/lib/rdoc/comment.rb +353 -0
- data/rdoc-8.0.0/lib/rdoc/cross_reference.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/encoding.rb +120 -0
- data/rdoc-8.0.0/lib/rdoc/erb_partial.rb +18 -0
- data/rdoc-8.0.0/lib/rdoc/erbio.rb +37 -0
- data/rdoc-8.0.0/lib/rdoc/generator/aliki.rb +200 -0
- data/rdoc-8.0.0/lib/rdoc/generator/darkfish.rb +824 -0
- data/rdoc-8.0.0/lib/rdoc/generator/json_index.rb +284 -0
- data/rdoc-8.0.0/lib/rdoc/generator/markup.rb +196 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/message_extractor.rb +68 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot/po_entry.rb +141 -0
- data/rdoc-8.0.0/lib/rdoc/generator/pot.rb +94 -0
- data/rdoc-8.0.0/lib/rdoc/generator/ri.rb +30 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/DESIGN.md +536 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_head.rhtml +163 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_icons.rhtml +208 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +27 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +41 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +67 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/class.rhtml +230 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/css/rdoc.css +2181 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/index.rhtml +22 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/aliki.js +513 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_controller.js +129 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/page.rhtml +18 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_footer.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_head.rhtml +43 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +5 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +17 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +16 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +32 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +6 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +15 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +11 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +39 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +3 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/class.rhtml +220 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/fonts.css +167 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/css/rdoc.css +701 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/add.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bug.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/date.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/delete.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/find.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/package.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/plugin.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/ruby.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/transparent.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/images/zoom.png +0 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/index.rhtml +24 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/darkfish.js +140 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/js/search.js +120 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/page.rhtml +19 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +21 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +65 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +72 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/navigation.js +105 -0
- data/rdoc-8.0.0/lib/rdoc/generator/template/json_index/js/searcher.js +271 -0
- data/rdoc-8.0.0/lib/rdoc/generator.rb +52 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/locale.rb +102 -0
- data/rdoc-8.0.0/lib/rdoc/i18n/text.rb +126 -0
- data/rdoc-8.0.0/lib/rdoc/i18n.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc/known_classes.rb +74 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/entities.rb +2131 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.kpeg +21 -0
- data/rdoc-8.0.0/lib/rdoc/markdown/literals.rb +454 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.kpeg +1315 -0
- data/rdoc-8.0.0/lib/rdoc/markdown.rb +16865 -0
- data/rdoc-8.0.0/lib/rdoc/markup/blank_line.rb +29 -0
- data/rdoc-8.0.0/lib/rdoc/markup/block_quote.rb +14 -0
- data/rdoc-8.0.0/lib/rdoc/markup/document.rb +164 -0
- data/rdoc-8.0.0/lib/rdoc/markup/element.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/markup/formatter.rb +285 -0
- data/rdoc-8.0.0/lib/rdoc/markup/hard_break.rb +34 -0
- data/rdoc-8.0.0/lib/rdoc/markup/heading.rb +170 -0
- data/rdoc-8.0.0/lib/rdoc/markup/include.rb +42 -0
- data/rdoc-8.0.0/lib/rdoc/markup/indented_paragraph.rb +47 -0
- data/rdoc-8.0.0/lib/rdoc/markup/inline_parser.rb +312 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list.rb +101 -0
- data/rdoc-8.0.0/lib/rdoc/markup/list_item.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/markup/paragraph.rb +28 -0
- data/rdoc-8.0.0/lib/rdoc/markup/parser.rb +585 -0
- data/rdoc-8.0.0/lib/rdoc/markup/pre_process.rb +317 -0
- data/rdoc-8.0.0/lib/rdoc/markup/raw.rb +66 -0
- data/rdoc-8.0.0/lib/rdoc/markup/rule.rb +20 -0
- data/rdoc-8.0.0/lib/rdoc/markup/table.rb +64 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_ansi.rb +144 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_bs.rb +86 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html.rb +682 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_crossref.rb +261 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_html_snippet.rb +287 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_joined_paragraph.rb +41 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_label.rb +84 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_markdown.rb +215 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_rdoc.rb +421 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_table_of_contents.rb +88 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_test.rb +77 -0
- data/rdoc-8.0.0/lib/rdoc/markup/to_tt_only.rb +107 -0
- data/rdoc-8.0.0/lib/rdoc/markup/verbatim.rb +83 -0
- data/rdoc-8.0.0/lib/rdoc/markup.rb +219 -0
- data/rdoc-8.0.0/lib/rdoc/options.rb +1412 -0
- data/rdoc-8.0.0/lib/rdoc/parser/c.rb +1227 -0
- data/rdoc-8.0.0/lib/rdoc/parser/changelog.rb +379 -0
- data/rdoc-8.0.0/lib/rdoc/parser/markdown.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rbs.rb +275 -0
- data/rdoc-8.0.0/lib/rdoc/parser/rd.rb +22 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby.rb +1266 -0
- data/rdoc-8.0.0/lib/rdoc/parser/ruby_colorizer.rb +253 -0
- data/rdoc-8.0.0/lib/rdoc/parser/simple.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/parser/text.rb +11 -0
- data/rdoc-8.0.0/lib/rdoc/parser.rb +298 -0
- data/rdoc-8.0.0/lib/rdoc/rbs_helper.rb +186 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.rb +1706 -0
- data/rdoc-8.0.0/lib/rdoc/rd/block_parser.ry +643 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.rb +1854 -0
- data/rdoc-8.0.0/lib/rdoc/rd/inline_parser.ry +593 -0
- data/rdoc-8.0.0/lib/rdoc/rd.rb +99 -0
- data/rdoc-8.0.0/lib/rdoc/rdoc.rb +724 -0
- data/rdoc-8.0.0/lib/rdoc/ri/driver.rb +1572 -0
- data/rdoc-8.0.0/lib/rdoc/ri/formatter.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/paths.rb +171 -0
- data/rdoc-8.0.0/lib/rdoc/ri/servlet.rb +452 -0
- data/rdoc-8.0.0/lib/rdoc/ri/store.rb +6 -0
- data/rdoc-8.0.0/lib/rdoc/ri/task.rb +71 -0
- data/rdoc-8.0.0/lib/rdoc/ri.rb +21 -0
- data/rdoc-8.0.0/lib/rdoc/rubygems_hook.rb +327 -0
- data/rdoc-8.0.0/lib/rdoc/server.rb +460 -0
- data/rdoc-8.0.0/lib/rdoc/stats/normal.rb +58 -0
- data/rdoc-8.0.0/lib/rdoc/stats/quiet.rb +59 -0
- data/rdoc-8.0.0/lib/rdoc/stats/verbose.rb +44 -0
- data/rdoc-8.0.0/lib/rdoc/stats.rb +484 -0
- data/rdoc-8.0.0/lib/rdoc/store.rb +1205 -0
- data/rdoc-8.0.0/lib/rdoc/task.rb +355 -0
- data/rdoc-8.0.0/lib/rdoc/text.rb +244 -0
- data/rdoc-8.0.0/lib/rdoc/token_stream.rb +104 -0
- data/rdoc-8.0.0/lib/rdoc/tom_doc.rb +257 -0
- data/rdoc-8.0.0/lib/rdoc/version.rb +10 -0
- data/rdoc-8.0.0/lib/rdoc.rb +239 -0
- data/rdoc-8.0.0/lib/rubygems_plugin.rb +14 -0
- data/rdoc-8.0.0/man/ri.1 +249 -0
- data/rdoc-8.0.0/rdoc-logo.svg +43 -0
- data/rdoc-8.0.0/rdoc.gemspec +74 -0
- metadata +256 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<body id="top" role="document" class="file">
|
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
3
|
+
|
|
4
|
+
<nav id="navigation" role="navigation">
|
|
5
|
+
<div id="project-navigation">
|
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
|
7
|
+
<%= render '_sidebar_search.rhtml' %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<%= render '_sidebar_table_of_contents.rhtml' if defined?(current) %>
|
|
11
|
+
<%= render '_sidebar_pages.rhtml' %>
|
|
12
|
+
<%= render '_sidebar_classes.rhtml' %>
|
|
13
|
+
|
|
14
|
+
<%= render '_footer.rhtml' %>
|
|
15
|
+
</nav>
|
|
16
|
+
|
|
17
|
+
<main role="main">
|
|
18
|
+
<%- if @main_page %>
|
|
19
|
+
<%= @main_page.description %>
|
|
20
|
+
<%- else %>
|
|
21
|
+
<p>This is the API documentation for <%= h @title %>.</p>
|
|
22
|
+
<%- end %>
|
|
23
|
+
</main>
|
|
24
|
+
</body>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Darkfish Page Functions
|
|
4
|
+
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
|
|
5
|
+
*
|
|
6
|
+
* Author: Michael Granger <mgranger@laika.com>
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* Provide console simulation for firebug-less environments */
|
|
11
|
+
/*
|
|
12
|
+
if (!("console" in window) || !("firebug" in console)) {
|
|
13
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
|
14
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
|
15
|
+
|
|
16
|
+
window.console = {};
|
|
17
|
+
for (var i = 0; i < names.length; ++i)
|
|
18
|
+
window.console[names[i]] = function() {};
|
|
19
|
+
};
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
function showSource( e ) {
|
|
24
|
+
var target = e.target;
|
|
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
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function hookSourceViews() {
|
|
37
|
+
document.querySelectorAll('.method-source-toggle').forEach(function (codeObject) {
|
|
38
|
+
codeObject.addEventListener('click', showSource);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
function hookSearch() {
|
|
43
|
+
var input = document.querySelector('#search-field');
|
|
44
|
+
var result = document.querySelector('#search-results');
|
|
45
|
+
result.classList.remove("initially-hidden");
|
|
46
|
+
|
|
47
|
+
var search_section = document.querySelector('#search-section');
|
|
48
|
+
search_section.classList.remove("initially-hidden");
|
|
49
|
+
|
|
50
|
+
var search = new Search(search_data, input, result);
|
|
51
|
+
|
|
52
|
+
search.renderItem = function(result) {
|
|
53
|
+
var li = document.createElement('li');
|
|
54
|
+
var html = '';
|
|
55
|
+
|
|
56
|
+
// TODO add relative path to <script> per-page
|
|
57
|
+
html += '<p class="search-match"><a href="' + index_rel_prefix + this.escapeHTML(result.path) + '">' + this.hlt(result.title);
|
|
58
|
+
if (result.params)
|
|
59
|
+
html += '<span class="params">' + result.params + '</span>';
|
|
60
|
+
html += '</a>';
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
if (result.namespace)
|
|
64
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
|
65
|
+
|
|
66
|
+
if (result.snippet)
|
|
67
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
|
68
|
+
|
|
69
|
+
li.innerHTML = html;
|
|
70
|
+
|
|
71
|
+
return li;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
search.select = function(result) {
|
|
75
|
+
var href = result.firstChild.firstChild.href;
|
|
76
|
+
var query = this.input.value;
|
|
77
|
+
if (query) {
|
|
78
|
+
var url = new URL(href, window.location.origin);
|
|
79
|
+
url.searchParams.set('q', query);
|
|
80
|
+
url.searchParams.set('nav', '0');
|
|
81
|
+
href = url.toString();
|
|
82
|
+
}
|
|
83
|
+
window.location.href = href;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
search.scrollIntoView = search.scrollInWindow;
|
|
87
|
+
|
|
88
|
+
// Check for ?q= URL parameter and trigger search automatically
|
|
89
|
+
if (typeof URLSearchParams !== 'undefined') {
|
|
90
|
+
var urlParams = new URLSearchParams(window.location.search);
|
|
91
|
+
var queryParam = urlParams.get('q');
|
|
92
|
+
if (queryParam) {
|
|
93
|
+
var navParam = urlParams.get('nav');
|
|
94
|
+
var autoSelect = navParam !== '0';
|
|
95
|
+
input.value = queryParam;
|
|
96
|
+
search.search(queryParam, autoSelect);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
function hookFocus() {
|
|
102
|
+
document.addEventListener("keydown", (event) => {
|
|
103
|
+
if (document.activeElement.tagName === 'INPUT') {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (event.key === "/") {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
document.querySelector('#search-field').focus();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function hookSidebar() {
|
|
114
|
+
var navigation = document.querySelector('#navigation');
|
|
115
|
+
var navigationToggle = document.querySelector('#navigation-toggle');
|
|
116
|
+
|
|
117
|
+
navigationToggle.addEventListener('click', function() {
|
|
118
|
+
navigation.hidden = !navigation.hidden;
|
|
119
|
+
navigationToggle.ariaExpanded = navigationToggle.ariaExpanded !== 'true';
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
var isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
|
|
123
|
+
if (isSmallViewport) {
|
|
124
|
+
navigation.hidden = true;
|
|
125
|
+
navigationToggle.ariaExpanded = false;
|
|
126
|
+
document.addEventListener('click', (e) => {
|
|
127
|
+
if (e.target.closest('#navigation a')) {
|
|
128
|
+
navigation.hidden = true;
|
|
129
|
+
navigationToggle.ariaExpanded = false;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
136
|
+
hookSourceViews();
|
|
137
|
+
hookSearch();
|
|
138
|
+
hookFocus();
|
|
139
|
+
hookSidebar();
|
|
140
|
+
});
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Search = function(data, input, result) {
|
|
2
|
+
this.data = data;
|
|
3
|
+
this.input = input;
|
|
4
|
+
this.result = result;
|
|
5
|
+
|
|
6
|
+
this.current = null;
|
|
7
|
+
this.view = this.result.parentNode;
|
|
8
|
+
this.searcher = new Searcher(data.index);
|
|
9
|
+
this.init();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Search.prototype = Object.assign({}, Navigation, new function() {
|
|
13
|
+
var suid = 1;
|
|
14
|
+
|
|
15
|
+
this.init = function() {
|
|
16
|
+
var _this = this;
|
|
17
|
+
var observer = function(e) {
|
|
18
|
+
switch(e.key) {
|
|
19
|
+
case 'ArrowUp':
|
|
20
|
+
case 'ArrowDown':
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
_this.search(_this.input.value);
|
|
24
|
+
};
|
|
25
|
+
this.input.addEventListener('keyup', observer);
|
|
26
|
+
this.input.addEventListener('click', observer); // mac's clear field
|
|
27
|
+
|
|
28
|
+
this.searcher.ready(function(results, isLast) {
|
|
29
|
+
_this.addResults(results, isLast);
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
this.initNavigation();
|
|
33
|
+
this.setNavigationActive(false);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
this.search = function(value, selectFirstMatch) {
|
|
37
|
+
this.selectFirstMatch = selectFirstMatch;
|
|
38
|
+
|
|
39
|
+
value = value.trim().toLowerCase();
|
|
40
|
+
if (value) {
|
|
41
|
+
this.setNavigationActive(true);
|
|
42
|
+
} else {
|
|
43
|
+
this.setNavigationActive(false);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (value == '') {
|
|
47
|
+
this.lastQuery = value;
|
|
48
|
+
this.result.innerHTML = '';
|
|
49
|
+
this.result.setAttribute('aria-expanded', 'false');
|
|
50
|
+
this.setNavigationActive(false);
|
|
51
|
+
} else if (value != this.lastQuery) {
|
|
52
|
+
this.lastQuery = value;
|
|
53
|
+
this.result.setAttribute('aria-busy', 'true');
|
|
54
|
+
this.result.setAttribute('aria-expanded', 'true');
|
|
55
|
+
this.firstRun = true;
|
|
56
|
+
this.searcher.find(value);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
this.addResults = function(results, isLast) {
|
|
61
|
+
var target = this.result;
|
|
62
|
+
if (this.firstRun && (results.length > 0 || isLast)) {
|
|
63
|
+
this.current = null;
|
|
64
|
+
this.result.innerHTML = '';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
for (var i=0, l = results.length; i < l; i++) {
|
|
68
|
+
var item = this.renderItem.call(this, results[i]);
|
|
69
|
+
item.setAttribute('id', 'search-result-' + target.childElementCount);
|
|
70
|
+
target.appendChild(item);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
if (this.firstRun && results.length > 0) {
|
|
74
|
+
this.firstRun = false;
|
|
75
|
+
this.current = target.firstChild;
|
|
76
|
+
this.current.classList.add('search-selected');
|
|
77
|
+
}
|
|
78
|
+
//TODO: ECMAScript
|
|
79
|
+
//if (jQuery.browser.msie) this.$element[0].className += '';
|
|
80
|
+
|
|
81
|
+
if (this.selectFirstMatch && this.current) {
|
|
82
|
+
this.selectFirstMatch = false;
|
|
83
|
+
this.select(this.current);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (isLast) {
|
|
87
|
+
this.selectFirstMatch = false;
|
|
88
|
+
this.result.setAttribute('aria-busy', 'false');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
this.move = function(isDown) {
|
|
93
|
+
if (!this.current) return;
|
|
94
|
+
var next = isDown ? this.current.nextElementSibling : this.current.previousElementSibling;
|
|
95
|
+
if (next) {
|
|
96
|
+
this.current.classList.remove('search-selected');
|
|
97
|
+
next.classList.add('search-selected');
|
|
98
|
+
this.input.setAttribute('aria-activedescendant', next.getAttribute('id'));
|
|
99
|
+
this.scrollIntoView(next, this.view);
|
|
100
|
+
this.current = next;
|
|
101
|
+
this.input.value = next.firstChild.firstChild.text;
|
|
102
|
+
this.input.select();
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
this.hlt = function(html) {
|
|
108
|
+
return this.escapeHTML(html).
|
|
109
|
+
replace(/\u0001/g, '<em>').
|
|
110
|
+
replace(/\u0002/g, '</em>');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
this.escapeHTML = function(html) {
|
|
114
|
+
return html.replace(/[&<>"`']/g, function(c) {
|
|
115
|
+
return '&#' + c.charCodeAt(0) + ';';
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
});
|
|
120
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<body id="top" role="document" class="file">
|
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
3
|
+
|
|
4
|
+
<nav id="navigation" role="navigation">
|
|
5
|
+
<div id="project-navigation">
|
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
|
7
|
+
<%= render '_sidebar_search.rhtml' %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<%= render '_sidebar_table_of_contents.rhtml' %>
|
|
11
|
+
<%= render '_sidebar_pages.rhtml' %>
|
|
12
|
+
|
|
13
|
+
<%= render '_footer.rhtml' %>
|
|
14
|
+
</nav>
|
|
15
|
+
|
|
16
|
+
<main role="main" aria-label="Page <%= h file.full_name %>">
|
|
17
|
+
<%= file.description %>
|
|
18
|
+
</main>
|
|
19
|
+
</body>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<body role="document">
|
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
3
|
+
|
|
4
|
+
<nav id="navigation" role="navigation">
|
|
5
|
+
<div id="project-navigation">
|
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
|
7
|
+
<%= render '_sidebar_search.rhtml' %>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<%= render '_sidebar_pages.rhtml' %>
|
|
11
|
+
<%= render '_sidebar_classes.rhtml' %>
|
|
12
|
+
|
|
13
|
+
<%= render '_footer.rhtml' %>
|
|
14
|
+
</nav>
|
|
15
|
+
|
|
16
|
+
<main role="main">
|
|
17
|
+
<h1>Not Found</h1>
|
|
18
|
+
|
|
19
|
+
<p><%= message %></p>
|
|
20
|
+
</main>
|
|
21
|
+
</body>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<body role="document">
|
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
3
|
+
|
|
4
|
+
<nav id="navigation" role="navigation">
|
|
5
|
+
<div id="project-navigation">
|
|
6
|
+
<div id="home-section" class="nav-section">
|
|
7
|
+
<h2>
|
|
8
|
+
<a href="<%= rel_prefix %>/" rel="home">Home</a>
|
|
9
|
+
</h2>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<%= render '_sidebar_search.rhtml' %>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<%= render '_sidebar_installed.rhtml' %>
|
|
16
|
+
<%= render '_footer.rhtml' %>
|
|
17
|
+
</nav>
|
|
18
|
+
|
|
19
|
+
<main role="main">
|
|
20
|
+
<h1>Local RDoc Documentation</h1>
|
|
21
|
+
|
|
22
|
+
<p>Here you can browse local documentation from the ruby standard library and
|
|
23
|
+
your installed gems.</p>
|
|
24
|
+
|
|
25
|
+
<%- extra_dirs = installed.select { |_, _, _, type,| type == :extra } %>
|
|
26
|
+
<%- unless extra_dirs.empty? %>
|
|
27
|
+
<h2>Extra Documentation Directories</h2>
|
|
28
|
+
|
|
29
|
+
<p>The following additional documentation directories are available:</p>
|
|
30
|
+
|
|
31
|
+
<ol>
|
|
32
|
+
<%- extra_dirs.each do |name, href, exists, _, path| %>
|
|
33
|
+
<li>
|
|
34
|
+
<%- if exists %>
|
|
35
|
+
<a href="<%= href %>"><%= h name %></a> (<%= h path %>)
|
|
36
|
+
<%- else %>
|
|
37
|
+
<%= h name %> (<%= h path %>; <i>not available</i>)
|
|
38
|
+
<%- end %>
|
|
39
|
+
</li>
|
|
40
|
+
<%- end %>
|
|
41
|
+
</ol>
|
|
42
|
+
<%- end %>
|
|
43
|
+
|
|
44
|
+
<%- gems = installed.select { |_, _, _, type,| type == :gem } %>
|
|
45
|
+
<%- missing = gems.reject { |_, _, exists,| exists } %>
|
|
46
|
+
<%- unless missing.empty? %>
|
|
47
|
+
<h2>Missing Gem Documentation</h2>
|
|
48
|
+
|
|
49
|
+
<p>You are missing documentation for some of your installed gems.
|
|
50
|
+
You can install missing documentation for gems by running
|
|
51
|
+
<kbd>gem rdoc --all</kbd>. After installing the missing documentation you
|
|
52
|
+
only need to reload this page. The newly created documentation will
|
|
53
|
+
automatically appear.</p>
|
|
54
|
+
|
|
55
|
+
<p>You can also install documentation for a specific gem by running one of
|
|
56
|
+
the following commands.</p>
|
|
57
|
+
|
|
58
|
+
<ul>
|
|
59
|
+
<%- missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq.each do |name| %>
|
|
60
|
+
<li><kbd>gem rdoc <%= h name %></kbd></li>
|
|
61
|
+
<%- end %>
|
|
62
|
+
</ul>
|
|
63
|
+
<%- end %>
|
|
64
|
+
</main>
|
|
65
|
+
</body>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<body id="top" class="table-of-contents">
|
|
2
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
3
|
+
|
|
4
|
+
<nav id="navigation" role="navigation">
|
|
5
|
+
<div id="project-navigation">
|
|
6
|
+
<%= render '_sidebar_navigation.rhtml' %>
|
|
7
|
+
|
|
8
|
+
<%= render '_sidebar_search.rhtml' %>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<%= render '_footer.rhtml' %>
|
|
12
|
+
</nav>
|
|
13
|
+
<main role="main">
|
|
14
|
+
<h1 class="class"><%= h @title %></h1>
|
|
15
|
+
|
|
16
|
+
<%- simple_files = @files.select { |f| f.text? } %>
|
|
17
|
+
<%- unless simple_files.empty? %>
|
|
18
|
+
<h2 id="pages">Pages</h2>
|
|
19
|
+
<ul>
|
|
20
|
+
<%- simple_files.sort.each do |file| %>
|
|
21
|
+
<li class="file">
|
|
22
|
+
<a href="<%= h file.path %>"><%= h file.page_name %></a>
|
|
23
|
+
<%
|
|
24
|
+
# HACK table_of_contents should not exist on Document
|
|
25
|
+
table = file.parse(file.comment).table_of_contents
|
|
26
|
+
unless table.empty? %>
|
|
27
|
+
<ul>
|
|
28
|
+
<%- table.each do |heading| %>
|
|
29
|
+
<li><a href="<%= h file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a></li>
|
|
30
|
+
<%- end %>
|
|
31
|
+
</ul>
|
|
32
|
+
<%- end %>
|
|
33
|
+
</li>
|
|
34
|
+
<%- end %>
|
|
35
|
+
</ul>
|
|
36
|
+
<%- end %>
|
|
37
|
+
|
|
38
|
+
<h2 id="classes">Classes and Modules</h2>
|
|
39
|
+
<ul>
|
|
40
|
+
<%- @modsort.each do |klass| %>
|
|
41
|
+
<li class="<%= klass.type %>">
|
|
42
|
+
<a href="<%= klass.path %>"><%= klass.full_name %></a>
|
|
43
|
+
<%- table = []
|
|
44
|
+
table.concat klass.parse(klass.comment_location).table_of_contents
|
|
45
|
+
table.concat klass.section_contents
|
|
46
|
+
|
|
47
|
+
unless table.empty? %>
|
|
48
|
+
<ul>
|
|
49
|
+
<%- table.each do |item| %>
|
|
50
|
+
<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
|
|
51
|
+
<li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a></li>
|
|
52
|
+
<%- end %>
|
|
53
|
+
</ul>
|
|
54
|
+
<%- end %>
|
|
55
|
+
</li>
|
|
56
|
+
<%- end %>
|
|
57
|
+
</ul>
|
|
58
|
+
|
|
59
|
+
<h2 id="methods">Methods</h2>
|
|
60
|
+
<ul>
|
|
61
|
+
<%- @store.all_classes_and_modules.flat_map do |mod|
|
|
62
|
+
mod.method_list
|
|
63
|
+
end.sort.each do |method| %>
|
|
64
|
+
<li class="method">
|
|
65
|
+
<a href="<%= method.path %>"><%= h method.pretty_name %></a>
|
|
66
|
+
—
|
|
67
|
+
<span class="container"><%= method.parent.full_name %></span>
|
|
68
|
+
</li>
|
|
69
|
+
<%- end %>
|
|
70
|
+
</ul>
|
|
71
|
+
</main>
|
|
72
|
+
</body>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Navigation allows movement using the arrow keys through the search results.
|
|
3
|
+
*
|
|
4
|
+
* When using this library you will need to set scrollIntoView to the
|
|
5
|
+
* appropriate function for your layout. Use scrollInWindow if the container
|
|
6
|
+
* is not scrollable and scrollInElement if the container is a separate
|
|
7
|
+
* scrolling region.
|
|
8
|
+
*/
|
|
9
|
+
Navigation = new function() {
|
|
10
|
+
this.initNavigation = function() {
|
|
11
|
+
var _this = this;
|
|
12
|
+
|
|
13
|
+
document.addEventListener('keydown', function(e) {
|
|
14
|
+
_this.onkeydown(e);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
this.navigationActive = true;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
this.setNavigationActive = function(state) {
|
|
21
|
+
this.navigationActive = state;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
this.onkeydown = function(e) {
|
|
25
|
+
if (!this.navigationActive) return;
|
|
26
|
+
switch(e.key) {
|
|
27
|
+
case 'ArrowLeft':
|
|
28
|
+
if (this.moveLeft()) e.preventDefault();
|
|
29
|
+
break;
|
|
30
|
+
case 'ArrowUp':
|
|
31
|
+
if (e.key == 'ArrowUp' || e.ctrlKey) {
|
|
32
|
+
if (this.moveUp()) e.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case 'ArrowRight':
|
|
36
|
+
if (this.moveRight()) e.preventDefault();
|
|
37
|
+
break;
|
|
38
|
+
case 'ArrowDown':
|
|
39
|
+
if (e.key == 'ArrowDown' || e.ctrlKey) {
|
|
40
|
+
if (this.moveDown()) e.preventDefault();
|
|
41
|
+
}
|
|
42
|
+
break;
|
|
43
|
+
case 'Enter':
|
|
44
|
+
if (this.current) e.preventDefault();
|
|
45
|
+
this.select(this.current);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
if (e.ctrlKey && e.shiftKey) this.select(this.current);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
this.moveRight = function() {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
this.moveLeft = function() {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
this.move = function(isDown) {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
this.moveUp = function() {
|
|
61
|
+
return this.move(false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
this.moveDown = function() {
|
|
65
|
+
return this.move(true);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Scrolls to the given element in the scrollable element view.
|
|
70
|
+
*/
|
|
71
|
+
this.scrollInElement = function(element, view) {
|
|
72
|
+
var offset, viewHeight, viewScroll, height;
|
|
73
|
+
offset = element.offsetTop;
|
|
74
|
+
height = element.offsetHeight;
|
|
75
|
+
viewHeight = view.offsetHeight;
|
|
76
|
+
viewScroll = view.scrollTop;
|
|
77
|
+
|
|
78
|
+
if (offset - viewScroll + height > viewHeight) {
|
|
79
|
+
view.scrollTop = offset - viewHeight + height;
|
|
80
|
+
}
|
|
81
|
+
if (offset < viewScroll) {
|
|
82
|
+
view.scrollTop = offset;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Scrolls to the given element in the window. The second argument is
|
|
88
|
+
* ignored
|
|
89
|
+
*/
|
|
90
|
+
this.scrollInWindow = function(element, ignored) {
|
|
91
|
+
var offset, viewHeight, viewScroll, height;
|
|
92
|
+
offset = element.offsetTop;
|
|
93
|
+
height = element.offsetHeight;
|
|
94
|
+
viewHeight = window.innerHeight;
|
|
95
|
+
viewScroll = window.scrollY;
|
|
96
|
+
|
|
97
|
+
if (offset - viewScroll + height > viewHeight) {
|
|
98
|
+
window.scrollTo(window.scrollX, offset - viewHeight + height);
|
|
99
|
+
}
|
|
100
|
+
if (offset < viewScroll) {
|
|
101
|
+
window.scrollTo(window.scrollX, offset);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|