mirror of
https://github.com/danbulant/api_docs
synced 2026-05-27 13:52:12 +00:00
Remove some unused JS.
This commit is contained in:
parent
1f4e6b915d
commit
a38011b4a5
2 changed files with 5 additions and 9 deletions
|
|
@ -54,7 +54,6 @@ under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupLanguages(l) {
|
function setupLanguages(l) {
|
||||||
var currentLanguage = l[0];
|
|
||||||
var defaultLanguage = localStorage.getItem("language");
|
var defaultLanguage = localStorage.getItem("language");
|
||||||
|
|
||||||
languages = l;
|
languages = l;
|
||||||
|
|
@ -81,7 +80,7 @@ under the License.
|
||||||
activateLanguage(language);
|
activateLanguage(language);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
window.onpopstate = function(event) {
|
window.onpopstate = function() {
|
||||||
activateLanguage(window.location.search.substr(1));
|
activateLanguage(window.location.search.substr(1));
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
//= require ../lib/_lunr
|
//= require ../lib/_lunr
|
||||||
//= require ../lib/_jquery.highlight
|
//= require ../lib/_jquery.highlight
|
||||||
(function (global) {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var $global = $(global);
|
var content, searchResults;
|
||||||
var content, darkBox, searchResults;
|
|
||||||
var highlightOpts = { element: 'span', className: 'search-highlight' };
|
var highlightOpts = { element: 'span', className: 'search-highlight' };
|
||||||
|
|
||||||
var index = new lunr.Index();
|
var index = new lunr.Index();
|
||||||
|
|
@ -31,7 +30,6 @@
|
||||||
|
|
||||||
function bind() {
|
function bind() {
|
||||||
content = $('.content');
|
content = $('.content');
|
||||||
darkBox = $('.dark-box');
|
|
||||||
searchResults = $('.search-results');
|
searchResults = $('.search-results');
|
||||||
|
|
||||||
$('#input-search').on('keyup', search);
|
$('#input-search').on('keyup', search);
|
||||||
|
|
@ -73,5 +71,4 @@
|
||||||
function unhighlight() {
|
function unhighlight() {
|
||||||
content.unhighlight(highlightOpts);
|
content.unhighlight(highlightOpts);
|
||||||
}
|
}
|
||||||
|
})();
|
||||||
})(window);
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue