use single component mkws-*.js files (was mkws.js)
[mkws-moved-to-github.git] / src / mkws-core.js
index de050e0..01f82c8 100644 (file)
@@ -96,16 +96,6 @@ mkws.log = function(string) {
 };
 
 
-mkws.objectWithParent = function(parent) {
-    function thing() {} // Must be function so `prototype' works
-
-    thing.prototype = parent;
-    var res = new thing();
-    thing.prototype = null;
-    return res;
-};
-
-
 // This function is taken from a StackOverflow answer
 // http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript/901144#901144
 mkws.getParameterByName = function(name) {
@@ -312,21 +302,15 @@ mkws.pagerNext = function(tname) {
        }
     }
 
-
-    // I don't understand why I need this copy, but I do: mkws_config
-    // is not visible inside the document.ready function, but the
-    // saved copy is.
-    var saved_config;
-    if (typeof mkws_config === 'undefined') {
-       log("setting empty config");
-       saved_config = {};
-    } else {
-       log("using config: " + $.toJSON(mkws_config));
-       saved_config = mkws_config;
-    }
-
-
     $(document).ready(function() {
+       var saved_config;
+       if (typeof mkws_config === 'undefined') {
+           log("setting empty config");
+           saved_config = {};
+       } else {
+           log("using config: " + $.toJSON(mkws_config));
+           saved_config = mkws_config;
+       }
        mkws.setMkwsConfig(saved_config);
 
        for (var key in mkws.config) {