Skip to content

Commit a868212

Browse files
committed
update document
1 parent 7425f00 commit a868212

26 files changed

Lines changed: 2473 additions & 1273 deletions
857 Bytes
Binary file not shown.

docs/build/doctrees/index.doctree

88 Bytes
Binary file not shown.
148 Bytes
Binary file not shown.
5.49 KB
Binary file not shown.
148 Bytes
Binary file not shown.

docs/build/doctrees/utils.doctree

3.19 KB
Binary file not shown.

docs/build/html/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 3f81806e6e0d3ba4cb83f80a56423781
3+
config: 1befa92887607bf4ab4cb12be9bb2350
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/build/html/_static/css/theme.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/build/html/_static/doctools.js

Lines changed: 62 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for all documentation.
66
*
7-
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
2929

3030
/**
3131
* small helper function to urldecode strings
32+
*
33+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
3234
*/
3335
jQuery.urldecode = function(x) {
34-
return decodeURIComponent(x).replace(/\+/g, ' ');
36+
if (!x) {
37+
return x
38+
}
39+
return decodeURIComponent(x.replace(/\+/g, ' '));
3540
};
3641

3742
/**
@@ -149,9 +154,7 @@ var Documentation = {
149154
this.fixFirefoxAnchorBug();
150155
this.highlightSearchWords();
151156
this.initIndexTable();
152-
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
153-
this.initOnKeyListeners();
154-
}
157+
this.initOnKeyListeners();
155158
},
156159

157160
/**
@@ -259,6 +262,16 @@ var Documentation = {
259262
hideSearchWords : function() {
260263
$('#searchbox .highlight-link').fadeOut(300);
261264
$('span.highlighted').removeClass('highlighted');
265+
var url = new URL(window.location);
266+
url.searchParams.delete('highlight');
267+
window.history.replaceState({}, '', url);
268+
},
269+
270+
/**
271+
* helper function to focus on search bar
272+
*/
273+
focusSearchBar : function() {
274+
$('input[name=q]').first().focus();
262275
},
263276

264277
/**
@@ -283,25 +296,54 @@ var Documentation = {
283296
},
284297

285298
initOnKeyListeners: function() {
299+
// only install a listener if it is really needed
300+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
301+
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
302+
return;
303+
286304
$(document).keydown(function(event) {
287305
var activeElementType = document.activeElement.tagName;
288306
// don't navigate when in search box, textarea, dropdown or button
289307
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
290-
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
291-
&& !event.shiftKey) {
292-
switch (event.keyCode) {
293-
case 37: // left
294-
var prevHref = $('link[rel="prev"]').prop('href');
295-
if (prevHref) {
296-
window.location.href = prevHref;
297-
return false;
298-
}
299-
case 39: // right
300-
var nextHref = $('link[rel="next"]').prop('href');
301-
if (nextHref) {
302-
window.location.href = nextHref;
303-
return false;
304-
}
308+
&& activeElementType !== 'BUTTON') {
309+
if (event.altKey || event.ctrlKey || event.metaKey)
310+
return;
311+
312+
if (!event.shiftKey) {
313+
switch (event.key) {
314+
case 'ArrowLeft':
315+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
316+
break;
317+
var prevHref = $('link[rel="prev"]').prop('href');
318+
if (prevHref) {
319+
window.location.href = prevHref;
320+
return false;
321+
}
322+
break;
323+
case 'ArrowRight':
324+
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
325+
break;
326+
var nextHref = $('link[rel="next"]').prop('href');
327+
if (nextHref) {
328+
window.location.href = nextHref;
329+
return false;
330+
}
331+
break;
332+
case 'Escape':
333+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
334+
break;
335+
Documentation.hideSearchWords();
336+
return false;
337+
}
338+
}
339+
340+
// some keyboard layouts may need Shift to get /
341+
switch (event.key) {
342+
case '/':
343+
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
344+
break;
345+
Documentation.focusSearchBar();
346+
return false;
305347
}
306348
}
307349
});
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
var DOCUMENTATION_OPTIONS = {
22
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
3-
VERSION: '0.3.3',
3+
VERSION: '0.3.4',
44
LANGUAGE: 'None',
55
COLLAPSE_INDEX: false,
66
BUILDER: 'html',
77
FILE_SUFFIX: '.html',
88
LINK_SUFFIX: '.html',
99
HAS_SOURCE: true,
1010
SOURCELINK_SUFFIX: '.txt',
11-
NAVIGATION_WITH_KEYS: false
11+
NAVIGATION_WITH_KEYS: false,
12+
SHOW_SEARCH_SUMMARY: true,
13+
ENABLE_SEARCH_SHORTCUTS: true,
1214
};

0 commit comments

Comments
 (0)