summaryrefslogtreecommitdiff
path: root/distro/common/html/_static/doctools.js
diff options
context:
space:
mode:
Diffstat (limited to 'distro/common/html/_static/doctools.js')
-rw-r--r--distro/common/html/_static/doctools.js19
1 files changed, 5 insertions, 14 deletions
diff --git a/distro/common/html/_static/doctools.js b/distro/common/html/_static/doctools.js
index d4619fdfb1..2036e5f5f8 100644
--- a/distro/common/html/_static/doctools.js
+++ b/distro/common/html/_static/doctools.js
@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
- * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
-}
+};
/**
* small helper function to urlencode strings
@@ -62,18 +62,6 @@ jQuery.getQueryParameters = function(s) {
};
/**
- * small function to check if an array contains
- * a given item.
- */
-jQuery.contains = function(arr, item) {
- for (var i = 0; i < arr.length; i++) {
- if (arr[i] == item)
- return true;
- }
- return false;
-};
-
-/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
@@ -180,6 +168,9 @@ var Documentation = {
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
+ if (!body.length) {
+ body = $('body');
+ }
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');