• R/O
  • HTTP
  • SSH
  • HTTPS

feedblog_ext: Commit

JavaScriptのみで記述されたブログツール・ソフトウェアです。表示にExt JSを使用します


Commit MetaInfo

Revisionb7c469ac9f4e741c1abf0da79998514127bb47b2 (tree)
Time2009-06-05 23:04:03
Authorelixirel <elixirel@user...>
Commiterelixirel

Log Message

add error prompt.

Change Summary

Incremental Difference

--- a/js/lunardial/feedblog_gen.js
+++ b/js/lunardial/feedblog_gen.js
@@ -113,7 +113,8 @@ function logXMLLoader(){
113113
114114 // 最新の日記をローディングする
115115 xmlLoader(initUrl);
116- }
116+ },
117+ error: showError
117118 });
118119 }
119120
@@ -126,7 +127,8 @@ function xmlLoader(url){
126127 var loader = new jQuery.ajax({
127128 url: url,
128129 method: "GET",
129- success: analyzeTargetXml
130+ success: analyzeTargetXml,
131+ error: showError
130132 });
131133 }
132134
@@ -349,6 +351,13 @@ function closePanel(id){
349351 }
350352
351353 /**
354+ * エラー画面を表示します
355+ */
356+function showError(){
357+ alert("XMLファイルのローディング中にエラーが発生しました!");
358+}
359+
360+/**
352361 * RFC3339形式の日時を出力します
353362 */
354363 function getDate(){
--- a/js/lunardial/feedblog_mixi.js
+++ b/js/lunardial/feedblog_mixi.js
@@ -214,7 +214,7 @@ function validateText(contents){
214214
215215 // ブロック要素のタグが存在した場合、改行をその後に挿入します。
216216 contents = contents.replace(/<(div|h\d|p)[^>]*>/ig, "-----------------------------------------------------------------------------\n");
217- contents = contents.replace(/<\/(div|h\d|p)>/ig, "\n-----------------------------------------------------------------------------\n");
217+ contents = contents.replace(/(\n|)<\/(div|h\d|p)>/ig, "\n-----------------------------------------------------------------------------\n");
218218
219219 // 通常のタグすべてを削除する
220220 contents = contents.replace(/<[^>]*>|<\/[^>]*>/ig, "");
Show on old repository browser