1/* jquery.metadata.2.1.js */ 2(function (e) { 3 e.extend( 4 { metadata: { 5 defaults: { 6 type: "class", 7 name: "metadata", 8 cre: /({.*})/, 9 single: "metadata", 10 unescape: true 11 }, 12 setType: function (b, a) { 13 this.defaults.type = b; 14 this.defaults.name = a; 15 }, 16 get: function (b, a) { 17 a = e.extend({}, this.defaults, a); 18 if (!a.single.length) 19 a.single = "metadata"; 20 var c = e.data(b, a.single); 21 if (c) 22 return c; 23 c = "{}"; 24 var h = function (d) { 25 if (typeof d != "string") 26 return d; 27 return d = eval("(" + d + ")"); 28 }; 29 if (a.type == "html5") { 30 var g = {}; 31 e(b.attributes).each(function () { 32 var d = this.nodeName; 33 if (d.match(/^data-/)) 34 d = d.replace(/^data-/, ""); 35 else return true; 36 g[d] = h(this.nodeValue); 37 }); 38 } else { 39 if (a.type == "class") { 40 var f = a.cre.exec(b.className); 41 if (f) 42 c = f[1]; 43 if (a.unescape) 44 c = c.replace(/%20/g, " "); 45 } else if (a.type == "elem") { 46 if (!b.getElementsByTagName) 47 return; 48 f = b.getElementsByTagName(a.name); 49 if (f.length) 50 c = e.trim(f[0].innerHTML); 51 } else if (b.getAttribute != undefined) 52 if (f = b.getAttribute(a.name)) 53 c = f; 54 g = h(c.indexOf("{") < 0 ? "{" + c + "}" : c); 55 } 56 e.data(b, a.single, g); 57 return g; 58 } 59 } 60 }); 61 e.fn.metadata = function (b) { 62 return e.metadata.get(this[0], b); 63 } 64})(jQuery);
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.