diff --git a/sphinx/themes/basic/static/doctools.js b/sphinx/themes/basic/static/doctools.js index d4619fdfb..38feb6c54 100644 --- a/sphinx/themes/basic/static/doctools.js +++ b/sphinx/themes/basic/static/doctools.js @@ -61,18 +61,6 @@ jQuery.getQueryParameters = function(s) { return result; }; -/** - * 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. diff --git a/sphinx/themes/basic/static/searchtools.js_t b/sphinx/themes/basic/static/searchtools.js_t index 45989c6ae..8e8acb8e0 100644 --- a/sphinx/themes/basic/static/searchtools.js_t +++ b/sphinx/themes/basic/static/searchtools.js_t @@ -150,7 +150,7 @@ var Search = { hlterms.push(tmp[i].toLowerCase()); } // only add if not already in the list - if (!$.contains(toAppend, word)) + if (!$u.contains(toAppend, word)) toAppend.push(word); }; var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" ")); @@ -217,7 +217,7 @@ var Search = { // search result. for (var i = 0; i < excluded.length; i++) { if (terms[excluded[i]] == file || - $.contains(terms[excluded[i]] || [], file)) { + $u.contains(terms[excluded[i]] || [], file)) { valid = false; break; }