OSDN Git Service

trpgchat ver1.1.1
[trpgtools-onweb/AjaxChat.git] / main.php
index 0b83cd0..e7f0673 100644 (file)
--- a/main.php
+++ b/main.php
@@ -1,6 +1,6 @@
 <?php
 /*
- * Ajax Chat for TRPG ver.1.1
+ * Ajax Chat for TRPG ver.1.1.1
  * (c)2007 Cake All righ1ts reserved.
  * Mail : cake_67@users.sourceforge.jp
  * Home : http://trpgtools-onweb.sourceforge.jp/
@@ -171,32 +171,6 @@ function clearLog(){
     });
 }
 
-function clearLog2(){
-    $(".com_row").remove();
-    $.ajax({
-        type: "GET",
-        ifModified: false,
-        url: logfile,
-        success: function(data){
-        var recent = data.split('\n');
-        var text = new Array();
-        for(var i=0;i<recent.length; i++){
-            var unit = recent[i].split('<>');
-            if (unit[0]) {
-                text[i] = setData(unit);
-            }
-        }
-        var text_rev = text.reverse();
-        for(var i=0;i<text_rev.length; i++){
-        //出力
-            if(text_rev[i]){
-                $("#online").after(text_rev[i]);
-            }
-        }
-    }
-    });
-}
-
 // ささやき指定
 function inputWhisper(name, whisperTo) {
     var flag = whisperTo ? true : false;
@@ -221,10 +195,10 @@ function setData(unit) {
     //行番号:最新行
     var last_id_tag = '<span id="id" style="display:none;">'+unit[0]+'</span>';
     //データの整形
-    var name = decodeURIComponent(unit[1]);
-    var pc = decodeURIComponent(unit[2]);
-    var color = decodeURIComponent(unit[3]);
-    var com = decodeURIComponent(unit[4]);
+    var name = unit[1];
+    var pc = unit[2];
+    var color = unit[3];
+    var com = unit[4];
     var d = new Date();
     d.setTime(unit[5]*1000);
     var year = d.getYear();
@@ -247,7 +221,7 @@ function setData(unit) {
         if ($(window.parent.document.getElementById("my_hash")).attr("value") == unit[10]) var whisper = 'from'
     }
     if(unit[11] == '1' && unit[12]) {
-        var status = decodeURIComponent(unit[12]);
+        var status = unit[12];
     }
 
     // 行の整形