yaplog.jp関連フィルタ Edit

コメントをズラズラと表示するようにする [2013-09-15] Edit

用途
コメント欄で熱い会話が繰り広げられても、yaplogはコメントがHTMLじゃないので保存しづらい上に、20件ずつの表示なのでズラズラ読めない。それを解決する。
コメントを保存したい場合はMHTでページごと保存することを推奨(Firefoxの場合UnMHTなどのインストールが必要) ※保存する場合他のフィルタは全て無効にした方が再現度が高くなる
(このフィルタを活用して http://prx.dip.jp/etc/ama.htm を作りました)
テスト用URL
http://yaplog.jp/lp-n-rena/archive/970#ct
[Patterns]
Name = "yaplog.jp: コメントをズラズラと表示するようにする [2013-09-15]"
Active = TRUE
URL = "yaplog.jp/[^/]+/archive/[0-9]+"
Limit = 128
Match = "(^(^</body>))"
Replace = "$STOP()"
          "<script type="text/javascript">"
          "var _d = document;"
          "var bu = pagingCommentList;"
          "var obj = _d.getElementById('comment_list');"
          "pagingCommentList = function(){"
          "	var clone = obj.cloneNode(true);"
          "	clone.removeAttribute('id');"
          "var a = _d.createElement('a');"
          "a.setAttribute('id', 'comment_list_'+arguments[2]);"
          "a.setAttribute('href', '#'+a.id);"
          "a.setAttribute('style', 'font-weight:bold; background-color:orange; color:white');"
          "a.appendChild(_d.createTextNode('PAGE '+arguments[2]));"
          "	clone.insertBefore(a, clone.firstChild);"
          "	obj.parentNode.insertBefore(clone, obj);"
          "	bu(arguments[0],arguments[1],arguments[2]);"
          "};"
          "</script>"

コメント全表示(「コメントをズラズラ」フィルタ必須) [2013-09-15] Edit

[Patterns]
Name = "yaplog.jp: コメント全表示(「コメントをズラズラ」フィルタ必須) [2013-09-15]"
Active = TRUE
URL = "yaplog.jp/[^/]+/archive/[0-9]+"
Limit = 128
Match = "(^(^</body>))"
Replace = "$STOP()"
          "<script type="text/javascript">"
          "var _d = document;"
          "function gonext() {"
          "	var next = _d.getElementById('comment_paging').lastChild.lastChild;"
          "	if (next.href) {"
          "		next.click();"
          "		setTimeout('gonext()', 1000);"
          "	}"
          "}"
          "setTimeout(function(){"
          "	if (_d.getElementById('comment_paging').lastChild.lastChild && confirm('\\u30b3\\u30e1\\u30f3\\u30c8\\u3092\\u5168\\u3066\\u8868\\u793a\\u3057\\u307e\\u3059\\u304b\\uff1f'))"
          "		gonext();"
          "}, 1000);"
          "</script>"


複製名前変更