1(function ($) { 2 "use strict"; 3 /*jslint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false */ 4 /*jshint undef: false, browser: true, devel: false, eqeqeq: false, bitwise: false, white: false, plusplus: false, regexp: false, nomen: false, validthis: true */ 5 /*global jQuery,setTimeout,projekktor,location,setInterval,YT,clearInterval,pixelentity,$ */ 6 $.pixelentity = $.pixelentity || {}; 7 8 var items = []; 9 var active = []; 10 11 function Factory() { 12 function add(cond,widget) { 13 items.push({ 14 check:cond, 15 widget:widget 16 }); 17 } 18 19 function build(target,controller) { 20 if (target.data("peWidgets")) { 21 return false; 22 } 23 var applied = false; 24 target.data("peWidgets",true); 25 var n = items.length; 26 var item; 27 var elem; 28 for (var i=0;i<n;i++) { 29 item = items[i]; 30 elem = item.check(target,controller); 31 if (elem) { 32 applied = true; 33 if (item.widget) { 34 active.push(new item.widget(elem)); 35 } 36 } 37 } 38 return applied; 39 } 40 41 $.extend(this, { 42 "add":add, 43 "build":build 44 }); 45 } 46 47 $.pixelentity.widgets = new Factory(); 48}(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.