1function init_vozme() { 2 3 var url = $("span#vozme").attr("data-url-init"); 4 var urlMain = $("span#vozme").attr("data-url-main"); 5 var sxToken = $("span#vozme").attr("data-token"); 6 7 var txt = ''; 8 txt = $(".modContent").siblings("h1").text() + " "; 9 10 var contenido = $(".modContent, context-parent, .modContentLateral").clone(); 11 contenido.find("script, .footer-share-options, select, form, .calendarioTabla, .pagination, style").remove(); 12 txt += contenido.text(); 13 14 var form = $(document.createElement('form')); 15 $(form).attr("id", 'form-vozme'); 16 $(form).attr("action", urlMain); 17 $(form).attr("method", "POST"); 18 19 var input_sxToken = $("<input>").attr("type", "hidden").attr("name", "sxToken").val(sxToken); 20 var input_contenido = $("<input>").attr("type", "hidden").attr("name", "text").val(txt); 21 22 $(form).append($(input_sxToken)); 23 $(form).append($(input_contenido)); 24 var data = $(form).serialize(); 25 26 if (!$('#bnt-play-vozme').hasClass("enable")) { 27 28 $.ajax({ 29 url: url, 30 type: "POST", 31 processData: false, 32 contentType: false, 33 data: data, 34 cache: false, 35 dataType: 'json', 36 beforeSend: function () { 37 38 $('#bnt-play-vozme').unbind('click'); 39 $('#block-play-vozme').hide(); 40 $('#block-play-vozme').html(''); 41 }, 42 success: function (response, textStatus, jqXHR) { 43 44 $('#bnt-play-vozme').addClass('enable'); 45 46 if (response.newWindows) { 47 var tgt = 'voice' 48 window.open(urlMain, tgt, 'width=330,height=100,resizable=yes,scrollbars=yes,locationbar=no,left=100,top=100'); 49 delete form; 50 51 } else { 52 $('#block-play-vozme').html(response.html); 53 $('#block-play-vozme').show(); 54 } 55 }, 56 error: function (jqXHR, textStatus, errorThrown) { 57 console.log(jqXHR); 58 console.log(textStatus); 59 console.log(errorThrown); 60 } 61 }); 62 63 } else { 64 $('#bnt-play-vozme').removeClass('enable'); 65 $('#bnt-play-vozme').bind('click'); 66 $('#block-play-vozme').hide(); 67 $('#block-play-vozme audio').each(function () { 68 this.pause(); 69 this.currentTime = 0; 70 }); 71 $('#block-play-vozme').html(''); 72 } 73}
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.