')}else{$(single_selector).wrap('');$(single_selector).append(buttonMarkup)} switch(style){case 'svg-icon':$(single_selector).find('.copy-the-code-button').html(copyTheCode.buttonSvg);break;case 'cover':case 'button':default:$(single_selector).find('.copy-the-code-button').html(button_text);break}})})},_getButtonMarkup:function(button_title,button_text,style){if('svg-icon'===style){button_text=copyTheCode.buttonSvg} return''},format:function(html){var tab='\t';var result='';var indent='';html.split(/>\s*).forEach(function(element){if(element.match(/^\/\w/)){indent=indent.substring(tab.length)} result+=indent+'<'+element+'>\r\n';if(element.match(/^\w[^>]*[^\/]$/)&&!element.startsWith("input")){indent+=tab}});return result.substring(1,result.length-3)},copyShortcode:function(event){event.preventDefault();var btn=$(this),oldText=btn.html(),target=btn.attr('data-target')||'',copy_content_as=btn.attr('data-copy-as')||copyTheCode.copy_content_as,button_copy_text=btn.attr('data-button-copy-text')||'',content=btn.attr('data-content')||'',link=btn.attr('data-link')||'';if(content){CopyTheCodeToClipboard.copy(content);btn.text(button_copy_text);setTimeout(function(){btn.html(oldText);if(link){window.open(link,'_blank').focus()}},1000);return} var source=$(target);if(!source.length){btn.text('Not found!');setTimeout(function(){btn.text(oldText)},1000);return} var html=source.html();html=CopyTheCode.format(html);if('html'!==copy_content_as){var brRegex=/
/gi;html=html.replace(brRegex,"\n");var divRegex=/
/gi;html=html.replace(divRegex,"\n");var pRegex=/

/gi;html=html.replace(pRegex,"\n");var pRegex=/

  • /gi;html=html.replace(pRegex,"\n");html=html.replace(/(<([^>]+)>)/ig,'')} if('html'!==copy_content_as){html=html.replace(/[\t\n]+/gm,' ').trim()}else{var reWhiteSpace=new RegExp("/^\s+$/");html=html.replace(reWhiteSpace,"")} var tempElement=$("
    ");$("body").append(tempElement);html=$.trim(html);$('#temp-element').html(html);var html=$('#temp-element').html();$('#temp-element').remove();var tempHTML=html;var tempPre=$("
  • '}}})()