}
var match_content = content.substring(start, end);
// highlight all keywords
keywords.forEach(function(keyword){
var regS = new RegExp(keyword, "gi");
match_content = match_content.replace(regS, ""+keyword+"");
});
str += "" + match_content +"...
"
}
str += "";
}
})};
str += "";
if (matchcounts == 0) { str = '
' }
if (keywords == "") { str = '
' }
resultContent.innerHTML = str;
});
proceedsearch();
}
});}
// handle and trigger popup window;resultContent.innerHTML = str;
});
proceedsearch();
}
});}
// handle and trigger popup window;('.popup-trigger').click(function(e) {
e.stopPropagation();
if (isfetched == false) {
searchFunc(path, 'local-search-input', 'local-search-result');
} else {
proceedsearch();
};
});
(′.popup−btn−close′).click(function(e)$(′.popup′).hide();$(".popoverlay").remove();$(′body′).css(′overflow′,″););('.popup').click(function(e){
e.stopPropagation();
});