Last modified by Super Admin on 2026/04/05 18:59

From version Icon 42.1 Icon
edited by Super Admin
on 2026/03/12 12:20
Change comment: There is no comment for this version
To version Icon 41.1 Icon
edited by Super Admin
on 2026/03/10 22:25
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1091,9 +1091,7 @@
1091 1091   var csrfEl = document.querySelector('input[name="form_token"]');
1092 1092   var csrfToken = csrfEl ? csrfEl.value : '';
1093 1093   var xhr = new XMLHttpRequest();
1094 - xhr.open('POST', '/bin/SeitokaiCode/EditPost?outputSyntax=plain', true);
1095 - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
1096 - var editPostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken);
1094 + xhr.open('GET', '/bin/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1097 1097   xhr.onload = function() {
1098 1098   try {
1099 1099   var res = JSON.parse(xhr.responseText);
... ... @@ -1106,7 +1106,7 @@
1106 1106   } catch(e) { alert('編集に失敗しました'); }
1107 1107   };
1108 1108   xhr.onerror = function() { alert('通信エラーが発生しました'); };
1109 - xhr.send(editPostData);
1107 + xhr.send();
1110 1110  }
1111 1111  
1112 1112  // 投稿の削除(確認ダイアログ付き)
... ... @@ -1113,9 +1113,7 @@
1113 1113  function confirmDeletePost(schoolPage, postObjNum, token) {
1114 1114   if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return;
1115 1115   var xhr = new XMLHttpRequest();
1116 - xhr.open('POST', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain', true);
1117 - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
1118 - var deletePostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token);
1114 + xhr.open('GET', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1119 1119   xhr.onload = function() {
1120 1120   try {
1121 1121   var res = JSON.parse(xhr.responseText);
... ... @@ -1128,7 +1128,7 @@
1128 1128   } catch(e) { alert('削除に失敗しました'); }
1129 1129   };
1130 1130   xhr.onerror = function() { alert('通信エラーが発生しました'); };
1131 - xhr.send(deletePostData);
1127 + xhr.send();
1132 1132  }
1133 1133  </script>
1134 1134  {{/html}}