1/** 2 * krnl js module: 3 * bootstrap.js 4 * 5 * desc: 6 * Controls the basics of initializing krnl site js code. 7 * Various modules register their initialization needs with this 8 * module. Once the document is ready, this module is activated, 9 * initializing various site sub-modules. 10 * 11 * requires: 12 * jQuery 13 */ 14 15var krnl = (function( app ) { 16 17 /* define new module */ 18 app.bootstrap = (function(){ 19 20 // vars 21 var _init_callbacks = []; 22 23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 24 25 function _init() { 26 27 for (var i=0; i < _init_callbacks.length; i++) { 28 _init_callbacks[i](); 29 }; 30 31 } 32 33 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 34 35 function _register( callback ) { 36 37 _init_callbacks.push( callback ); 38 39 } 40 41 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 42 43 function _docwrite(options) { 44 45 _register(function(){ 46 $(options.selector).html(options.json); 47 }); 48 49 } 50 51 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 52 53 /* return public-facing methods and/or vars */ 54 return { 55 init : _init 56 ,register : _register 57 ,docwrite : _docwrite 58 }; 59 60 }()); 61 62 return app; /* return augmented app object */ 63 64}( krnl || {} )); /* import app if exists, or create new */ 65 66/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
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.