1/* 2 * To change this license header, choose License Headers in Project Properties. 3 * To change this template file, choose Tools | Templates 4 * and open the template in the editor. 5 */ 6 7jQuery(document).ready(function ($) { 8 9 10 /* Noty logic */ 11 Noty.overrideDefaults({ 12 theme: 'semanticui', 13 closeWith: ['click', 'button'], 14 timeout: 2000, 15 animation: { 16 open: 'animated fadeInRight', 17 close: 'animated fadeOutRight' 18 } 19 }); 20 21 22 $('.clip-var').click(function (event) { 23 var range = document.createRange(); 24 range.selectNodeContents(this); 25 26 window.getSelection().addRange(range); 27 /* Copy the text inside the text field */ 28 document.execCommand("copy"); 29 30 new Noty({ 31 type: 'success', 32 text: '<b>' + $(this).html() + '</b><br/>copié dans le presse papier :)', 33 }).show(); 34 }); 35 36 37 $('.copy-content').on('click', function () { 38 const $btn = $(this); 39 $btn.addClass('pulse'); 40 41 let text = $btn.attr('data-tocopy').trim(); 42 43 // Copier via input temporaire 44 let temp = $('<input>'); 45 $('body').append(temp); 46 temp.val(text).select(); 47 document.execCommand('copy'); 48 temp.remove(); 49 50 // Ajouter tooltip temporaire 51 const originalTitle = $btn.attr('title') || ''; 52 $btn.attr('title', 'Copié !').tooltip({trigger: 'manual'}).tooltip('show'); 53 54 setTimeout(function () { 55 $btn.tooltip('hide').attr('title', originalTitle); 56 $btn.removeClass('pulse'); 57 }, 1000); 58 59 }); 60 61 62 63 function copytrue(obj) { 64 obj.parent().append("<span class='copy-true right '>ð</span>"); 65 setTimeout(function () { 66 ct = obj.parent().find('.copy-true'); 67 ct.remove(); 68 }, 2000); 69 } 70 71 72}); 73 74jQuery(document).ajaxComplete(function ($) { 75 76 jQuery('.copy-content').on('click', function () { 77 const jQuerybtn = jQuery(this); 78 jQuerybtn.addClass('pulse'); 79 80 let text = jQuerybtn.attr('data-tocopy').trim(); 81 82 // Copier via input temporaire 83 let temp = jQuery('<input>'); 84 jQuery('body').append(temp); 85 temp.val(text).select(); 86 document.execCommand('copy'); 87 temp.remove(); 88 89 // Ajouter tooltip temporaire 90 const originalTitle = jQuerybtn.attr('title') || ''; 91 jQuerybtn.attr('title', 'Copié !').tooltip({trigger: 'manual'}).tooltip('show'); 92 93 setTimeout(function () { 94 jQuerybtn.tooltip('hide').attr('title', originalTitle); 95 jQuerybtn.removeClass('pulse'); 96 }, 1000); 97 }); 98 99 function copytrue(obj) { 100 obj.parent().append("<span class='copy-true right '>ð</span>"); 101 setTimeout(function () { 102 ct = obj.parent().find('.copy-true'); 103 ct.remove(); 104 }, 2000); 105 } 106 107}); 108
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.