1jQuery(document).ready(function($) { 2 $('button[data-details]').on('click', function() { 3 var encodedDetails = $(this).data('details'); 4 var decodedDetails = atob(encodedDetails); 5 var detailsContainer = $(this).next('.contact-details'); 6 7 detailsContainer.html(decodedDetails.replace(/\n/g, '<br>')); 8 $(this).remove(); 9 }); 10 11 $('button[data-info]').not('.praca-widget-button-phone').on('click', function() { 12 var encodedDetails = $(this).data('info'); 13 var decodedDetails = atob(encodedDetails); 14 $(this).text(decodedDetails); 15 }); 16 17 // "Aplikuj Teraz" 18 $('button.praca-widget-button-cta').on('click', function() { 19 var $button = $(this); 20 var target = ''; 21 22 try { 23 target = atob($button.attr('data-cta') || ''); 24 } catch (e) { 25 target = ''; 26 } 27 target = $.trim(target); 28 29 if (!target) { 30 return; 31 } 32 33 if (/^https?:\/\//i.test(target)) { 34 var newWindow = window.open(target, '_blank', 'noopener'); 35 if (!newWindow) { 36 window.location.href = target; 37 } 38 return; 39 } 40 41 var isMail = /^mailto:/i.test(target); 42 var value = target.replace(/^(mailto:|tel:)/i, '').split('?')[0]; 43 var subject = $.trim($button.attr('data-cta-subject') || ''); 44 45 if (isMail && subject && target.indexOf('?') === -1) { 46 target = target + '?subject=' + encodeURIComponent(subject); 47 } 48 49 showApplyPanel($button, target, value, isMail); 50 }); 51 52 function showApplyPanel($button, target, value, isMail) { 53 if ($button.next('.praca-cta-fallback').length) { 54 return; 55 } 56 57 var $box = $('<div class="praca-cta-fallback"></div>'); 58 $box.append( 59 $('<p class="praca-cta-fallback-label"></p>').text( 60 isMail ? 'WyÅlij CV na adres:' : 'ZadzwoÅ pod numer:' 61 ) 62 ); 63 $box.append( 64 $('<a class="praca-cta-fallback-value"></a>').attr('href', target).text(value) 65 ); 66 67 var $actions = $('<div class="praca-cta-fallback-actions"></div>'); 68 var $copy = $('<button type="button" class="praca-cta-copy"></button>').text( 69 isMail ? 'Kopiuj adres e-mail' : 'Kopiuj numer' 70 ); 71 $copy.on('click', function() { 72 copyToClipboard(value, $copy); 73 }); 74 $actions.append($copy); 75 76 $box.append($actions); 77 78 $button.after($box.hide()); 79 $box.slideDown(180); 80 } 81 82 function copyToClipboard(text, $trigger) { 83 var done = function() { 84 var original = $trigger.data('original-text') || $trigger.text(); 85 $trigger.data('original-text', original).text('Skopiowano!'); 86 window.setTimeout(function() { 87 $trigger.text(original); 88 }, 2000); 89 }; 90 91 if (navigator.clipboard && navigator.clipboard.writeText) { 92 navigator.clipboard.writeText(text).then(done, function() { 93 legacyCopy(text, done); 94 }); 95 return; 96 } 97 98 legacyCopy(text, done); 99 } 100 101 function legacyCopy(text, done) { 102 var $temp = $('<input type="text">').val(text).css({ 103 position: 'fixed', 104 top: '-1000px', 105 opacity: 0 106 }); 107 $('body').append($temp); 108 $temp[0].select(); 109 try { 110 document.execCommand('copy'); 111 done(); 112 } catch (e) { 113 } 114 $temp.remove(); 115 } 116}); 117 118function printPage() { 119 window.print(); 120}
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.