theme: remove search artifacts #210

This commit is contained in:
Sören Weber 2022-02-25 22:40:55 +01:00
parent b0ded62b1f
commit ac7a968be1
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -240,7 +240,7 @@ jQuery(function() {
return false;
});
var sidebarStatus = searchStatus = 'open';
var sidebarStatus = 'open';
ps = new PerfectScrollbar('#sidebar .highlightable');
setMenuHeight();
@ -259,20 +259,6 @@ jQuery(function() {
location.reload();
return false;
});
jQuery('[data-search-toggle]').on('click', function() {
if (sidebarStatus == 'closed') {
jQuery('[data-sidebar-toggle]').trigger('click');
jQuery(document.body).removeClass('searchbox-hidden');
searchStatus = 'open';
return false;
}
jQuery(document.body).toggleClass('searchbox-hidden');
searchStatus = (jQuery(document.body).hasClass('searchbox-hidden') ? 'closed' : 'open');
return false;
});
var ajax;
jQuery('[data-search-input]').on('input', function() {
@ -312,7 +298,6 @@ jQuery(function() {
if (sessionStorage.getItem('search-value')) {
var searchValue = sessionStorage.getItem('search-value')
$(document.body).removeClass('searchbox-hidden');
$('[data-search-input]').val(searchValue);
$('[data-search-input]').trigger('input');
var searchedElem = $('#body-inner').find(':contains(' + searchValue + ')').get(0);