function highlightKeyword() {
var match = location.search.match(/[?&]kw=([^&]+)/);
var kw = match ? $.trim(decodeURIComponent(match[1].replace(/\+/g, ' '))) : '';
if (!kw) return;
var reg = new RegExp('(' + kw.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + ')', 'gi');
var escapeMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' };
$('section, section *').not('script, style, textarea').contents().filter(function() {
return this.nodeType === 3;
}).each(function() {
var escapedText = this.nodeValue.replace(/[&<>"']/g, function(m) { return escapeMap[m]; });
var highlighted = escapedText.replace(reg, '$1');
if (escapedText !== highlighted) {
$(this).replaceWith(highlighted);
}
});
}
function initCopyButtons() {
$('.copy').remove();
$('div.highlight').each(function () {
var $btn = $('