Advertisement
keysle

Final K8r Juoopt .js

Oct 23rd, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // http://k8r.us
  2. (function(){
  3.     options = (function(){
  4.         function options(){
  5.             var Plugin, r;
  6.             this.r = {
  7.                 // /////////////////////////////////////////// START: Options
  8.                 'namespace':'k8r_',
  9.                 'pluginOption':'optionValue',
  10.                 // /////////////////////////////////////////// END: Options
  11.             }
  12.         }
  13.         return options;
  14.     })();
  15.     Plugin = (function(){
  16.         function Plugin(options){
  17.             this.k8 = options;
  18.             // //////////////////////////////////////////////// START: MEAT
  19.             this.other_initial_variables = 'initial variable';
  20.             this.initializing_function();
  21.         }
  22.  
  23.         Plugin.prototype.initializing_function = function(){
  24.             alert(this.k8.r['pluginOption']);
  25.         };
  26.         // ///////////////////////////////////////////////////// END: MEAT
  27.         return Plugin;
  28.     })();
  29.  
  30.     function initiate(){
  31.         var plugin;
  32.         return plugin = new Plugin(new options);
  33.     }
  34.  
  35.     if(window.addEventListener){
  36.         window.addEventListener('load',initiate,false);
  37.     }else{
  38.         window.attachEvent('onload',initiate);
  39.     }
  40. }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement