1var a = true; 2$(function () { 3// console.log("BOXUNPACKER"); 4 $('#content, #content p, #content pre, #content h1, #content h2, #content h3, #content h4, #content h5, #content h6, #content div').contents().filter(function () { 5 // 8 = Node.COMMENT_NODE 6// console.log("nod val: " + this.nodeValue + " nod type: " + this.nodeType + " nod name: " + this.nodeName); 7 return this.nodeType == 8; 8 }).each(function (index, value) { 9// console.log("usao..."); 10 var copy = $(value).parent().clone(); 11 copy.empty(); 12 $(value).parent().contents().each(function (index, value) { 13 if (value.nodeType != 8) { 14 copy.append($(value)); 15 } else { 16 if (value.nodeValue.startsWith('<box')) { 17 18 if (!isEmpty(copy)) { 19 $(value).parent().before(copy); 20 } 21 copy = $(value).parent().clone(); 22 copy.empty(); 23 24 var valueCopy = $(value).clone(); 25 $(value).parent().before(valueCopy); 26 27 var tag = value.nodeValue.replace('>', '').split(' '); 28 29 30 var cls = tag[1]; 31 var id = tag[2]; 32 var type = tag[3]; 33 34 35 36 var params = {}; 37 params.boxId = id; 38 params.autoplay = false; 39 params.pClass = cls; 40 41 42 43 if (type !== null) { 44 45 $.ajax({ 46 url: "/boxes/" + type + "Box.jsp", 47 type: "POST", 48 data: params, 49 success: function (data, textStatus, jqXHR) { 50 $(valueCopy).replaceWith(data); 51 }, 52 complete: function (jqXHR, textStatus) { 53 }, 54 error: function (jqXHR, textStatus, errorThrown) { 55 } 56 }); 57 } 58 } 59 } 60 }); 61 if (!isEmpty(copy)) { 62 $(value).parent().before(copy); 63 } 64 $(value).parent().remove(); 65 }); 66}); 67function isEmpty(el) { 68 return !$.trim(el.html()); 69}
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.