1$ = jQuery; 2$(document).ready(function () { 3 document.querySelectorAll('code').forEach(function (codeBlock) { 4 var button = document.createElement('button'); 5 button.className = 'copy-code-button'; 6 button.type = 'button'; 7 var s = codeBlock.innerText; 8 button.setAttribute('data-clipboard-text',s); 9 button.innerText = 'Copy'; 10 11 codeBlock.classList.add('prettyprint'); 12 codeBlock.appendChild(button); 13 }); 14 15 if (typeof ClipboardJS !== 'undefined') { 16 var clipboard = new ClipboardJS('.copy-code-button'); 17 clipboard.on('success', function(e) { 18 //console.info('Action:', e.action); 19 //console.info('Text:', e.text); 20 //console.info('Trigger:', e.trigger); 21 e.trigger.textContent = 'Copied!'; 22 window.setTimeout(function() { 23 e.trigger.textContent = 'Copied!'; 24 }, 2000); 25 e.clearSelection(); 26 27 }); 28 29 clipboard.on('error', function(e) { 30 console.error('Action:', e.action); 31 console.error('Trigger:', e.trigger); 32 e.trigger.textContent = 'Opps. Cant copy.'; 33 window.setTimeout(function() { 34 e.trigger.textContent = 'Copy'; 35 }, 2000); 36 e.clearSelection(); 37 }); 38 } 39 40 41 /* <![CDATA[ */ 42 var google_conversion_id = 819549718; 43 var google_custom_params = window.google_tag_params; 44 var google_remarketing_only = true; 45 /* ]]> */ 46 47 /*Fix the french demo preview url*/ 48 //console.log('test3333') 49 jQuery('a[href*=".io/fr/demos/?theme="]').each(function () { 50 this.setAttribute('href', this.getAttribute('href').replace('.io/fr/demos/?theme=', '.io/demos/?theme=')); 51 }); 52 jQuery('a[href*=".io/fr/go/"]').each(function () { 53 this.setAttribute('href', this.getAttribute('href').replace('.io/fr/go/', '.io/go/')); 54 }); 55 56});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.