Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://k8r.us
- (function(){
- options = (function(){
- function options(){
- var Plugin, r;
- this.r = {
- // /////////////////////////////////////////// START: Options
- 'namespace':'k8r_',
- 'pluginOption':'optionValue',
- // /////////////////////////////////////////// END: Options
- }
- }
- return options;
- })();
- Plugin = (function(){
- function Plugin(options){
- this.k8 = options;
- // //////////////////////////////////////////////// START: MEAT
- this.other_initial_variables = 'initial variable';
- this.initializing_function();
- }
- Plugin.prototype.initializing_function = function(){
- alert(this.k8.r['pluginOption']);
- };
- // ///////////////////////////////////////////////////// END: MEAT
- return Plugin;
- })();
- function initiate(){
- var plugin;
- return plugin = new Plugin(new options);
- }
- if(window.addEventListener){
- window.addEventListener('load',initiate,false);
- }else{
- window.attachEvent('onload',initiate);
- }
- }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement