*** empty log message ***
[m17n/m17n-lib-js.git] / mim.js
diff --git a/mim.js b/mim.js
index 5dac255..26c978f 100644 (file)
--- a/mim.js
+++ b/mim.js
@@ -51,6 +51,9 @@ var MIM = {
   }
 };
   
+if (window.location == 'http://localhost/mim/index.html')
+  MIM.server = 'http://localhost/mim';
+
 (function () {
   var keysyms = new Array ();
   keysyms["bs"]        = "backspace";
@@ -1125,7 +1128,7 @@ MIM.im_domain.DefType (MIM.State.prototype);
   var proto = {
     Load: function ()
     {
-      var node = Xex.Load (null, this.file);
+      var node = Xex.Load (MIM.server, this.file);
       if (! node)
        {
          this.load_status = MIM.LoadStatus.Error;
@@ -1661,7 +1664,7 @@ MIM.im_domain.DefType (MIM.State.prototype);
 
   MIM.IC.prototype = proto;
 
-  var node = Xex.Load (null, "imlist.xml");
+  var node = Xex.Load (MIM.server, "imlist.xml");
   for (node = node.firstChild; node; node = node.nextSibling)
     if (node.nodeName == 'input-method')
       {
@@ -2394,8 +2397,6 @@ MIM.keypress = function (event)
     MIM.add_event_listener (window, 'keydown', MIM.keydown);
     MIM.add_event_listener (window, 'keypress', MIM.keypress);
     MIM.add_event_listener (window, 'mousedown', create_menu);
-    if (window.location == 'http://localhost/mim/index.html')
-      MIM.server = 'http://localhost/mim';
-    MIM.current = MIM.imlist['zh']['py-gb'];
+    MIM.current = MIM.imlist['t']['latn-post'];
   };
 }) ();