packages/changelog/docs/js/search/search.js
Function displayResults
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
Function bindSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');
Function updateQueryString
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateQueryString(key, value) {
value = encodeURIComponent(value);
var url = window.location.href;
var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),