1define({ 2 load : function(name, req, onload, config) { 3 var urlVars = {}; 4 var plugins = []; 5 6 var supportedPlugins = { 7 arrayLib : "sv_arrayLib", 8 urlLib : "sv_urlLib", 9 miscLib : "sv_miscLib", 10 objectLib : "sv_objectLib", 11 stringLib : "sv_stringLib", 12 moment : "moment", 13 numeral : "numeral", 14 cloudinary : "sv_cloudinaryLib/default", 15 clientMoment : "sv_clientMoment", 16 crmLib : "sv_crmLib", 17 videoLib : "sv_videoLib", 18 sv_site : "sv_site", 19 "plugins_dtn" : "plugins_dtn/goatee_plugin" 20 } 21 22 if (name !== "") { 23 var terms = name.split("&"); 24 terms.forEach(function(val, i) { 25 var parts = val.split("="); 26 urlVars[parts[0]] = parts[1]; 27 }); 28 } 29 30 var reqs = ["goatee"]; 31 32 if (urlVars.plugins !== undefined) { 33 plugins = urlVars.plugins.split(","); 34 35 reqs = reqs.concat(plugins.map(function(val, i) { 36 return supportedPlugins[val]; 37 })); 38 } 39 40 req(reqs, function() { 41 // v8 - argumentsToArray one-liner 42 var args = new Array(arguments.length); for(var i = 0; i < arguments.length; i++) { args[i] = arguments[i]; } 43 var goatee = new (args.shift()).Goatee() 44 45 plugins.forEach(function(val, i) { 46 goatee.addPlugin(val, args[i]); 47 }); 48 49 // prevents downstream code from adding additional plugins or else we could hit nasty race conditions because this singleton is shared in many places 50 goatee.lock(); 51 52 onload(goatee); 53 }); 54 } 55});
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.