186(guide)

説明

CSS関係のTipsとProxomitronのフィルタの話がメインです。

1000-02-02 Sun?D Referred Tr

[][] ?D Referred Tr

順番は守る様に。

Name = "?D Referred Tr(msn)"
Active = TRUE
URL = "(d|diary).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://search\.msn\.*/*\?*q=\4(\&*|)</a></li>"
Replace = "<li>\1 (msn) <a href="\2"> \4 </a></li>"

Name = "?D Referred Tr(Google&Yahoo&goo&biglobe&nifty&excite&infoseek&aol)"
Active = TRUE
URL = "(d|diary).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(www|(web|cgi\.|ocn|odn|)search|so-net|dion|ocn|odn|home|apple|(aol|)search\.jp)\.(google|yahoo|goo|biglobe|nifty|excite|infoseek|aol)\3\.*/*\?*(p|q|s|MT|Text|search|qt|query)=\4(\&*|)</a></li>"
Replace = "<li>\1 (\3) <a href="\2"> \4 </a></li>"

Name = "?D Referred Tr(D_Keyword,KeywordD,ASIN)"
Active = TRUE
URL = "(d|diary).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(d|diary).hatena.ne.jp/(keyword|keyworddiary|asin)\3/\4</a></li>"
Replace = "<li>\1 <span style="color:#00ff00">(\3)</span> <a href="\2">\4</a></li>"

Name = "?D Referred Tr(D_noD)"
Active = TRUE
URL = "(d|diary).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(d|diary).hatena.ne.jp/\3/</a></li>"
Replace = "<li>\1 <span style="color:#f00000">(Diary)</span> <a href="http://a.hatena.ne.jp/\3/simple">[A]</a> <a href="\2">id:\3</a></li>"

Name = "?D Referred Tr(D_+D)"
Active = TRUE
URL = "(d|diary).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(d|diary).hatena.ne.jp/\3/\4</a></li>"
Replace = "<li>\1 <span style="color:#f00000">(Diary)</span> <a href="http://a.hatena.ne.jp/\3/simple">[A]</a> <a href="http://d.hatena.ne.jp/\3/">id:\3</a> : <a href="\2">\3 / \4</a></li>"

Name = "?D Referred Tr(A_map_forID)"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(antenna|a).hatena.ne.jp/map?http://(diary|d).hatena.ne.jp/\3/</a></li>"
Replace = "<li>\1 (A_Map) <a href="http://a.hatena.ne.jp/\3/simple">[A]</a> <a href="\2">[A_Map]</a>"
          " <a href="http://d.hatena.ne.jp/\3/">id:\3</a></li>"

Name = "?D Referred Tr(A_map_noID)"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(antenna|a).hatena.ne.jp/map?http://\3</a></li>"
Replace = "<li>\1 (A_Map) <a href="\2">[A_Map]</a> <a href="http://\3">http://\3</a></li>"

Name = "?D Referred Tr(A)"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/"
Bounds = "<li*</li>"
Limit = 9000
Match = "<li>\1<a href="\2">http://(antenna|a).hatena.ne.jp/\3/\4</a></li>"
Replace = "<li>\1 <span style="color:#0000f0">(Antenna)</span> <a href="http://a.hatena.ne.jp/\3/simple">[A]</a> <a href="http://d.hatena.ne.jp/\3/">id:\3</a> /  \4</li>"

1000-02-01 Sat?D Edit JavaScript

[][] ?D Edit JavaScript注意

Mozilla and IE Text Editorをはてなダイアリー用に弄ったもの。

サンプルは?D Edit JavaScript for Mozilla and IE(はてなダイアリー入力支援)にあるので、試すと宜し。

IEの場合、上記のファイルを全部ダウンロード。適当なフォルダに保存。?D Edit JavaScript1と?D Edit JavaScript4中の「src="file:///~/hatena.js"」を適宜ローカルのファイルへのリンクに書き換える*1

Mozilla系の場合は、hatena.jsだけ適当にWeb上にアップ。?D Edit JavaScript1中の「src="file:///~/hatena.js"」をhatena.jsへのリンクに書き換える*2

Proxomitronでの注意。

toc氏@The Proxomitron filters against browser crashersが作ったAnti Browser Crasher030529.zipを入れてる人はSafeList.txtの設定をしている筈なので、「d.hatena.ne.jp/」と「自分がhatena.js」を置いたサーバーを追加。

無い人は以下の手順を踏むこと。

1.SafeList.txtを作る。

中身は

d.hatena.ne.jp/
自分がhatena.jsを置いたサーバー

俺の場合、

d.hatena.ne.jp/
186.bz/

になる。

2.Proxmitronの設定→BlockFileでSafeList.txtを設定

3.JavaScriptに関連しそうなフィルタのURLに^$LST(SafeList)を追加。

[][] 改造したい人へ。

hatena.jsを弄りましょう。何となく想像は付くと思います。

新しい機能を付け加える場合は、hatena.jsを弄る→ボタンを作る→?D Edit JavaScript4を弄る、で。

ins,del,span.aaはあっても良いな。

[][] ?D Edit JavaScript

Name = "?D Edit JavaScript1"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/*/edit"
Limit = 256
Match = "</style>"
Replace = "</style>\n"
          "\n"
          "\n"
          "\t<style type="text/css">\n"
          "\t\t.buttons {\n"
          "\t\t\tbackground: #cccccc;\n"
          "\t\t\tborder: 1px solid #cccccc;\n"
          "\t\t\tmargin: 1px;\n"
          "\t\t\tpadding: 0;\n"
          "\t\t}\n"
          "\t\t\n"
          "\t\t.raise\t{\n"
          "\t\t\tborder-top: 1px solid buttonhighlight;\n"
          "\t\t\tborder-left: 1px solid buttonhighlight;\n"
          "\t\t\tborder-bottom: 1px solid buttonshadow;\n"
          "\t\t\tborder-right: 1px solid buttonshadow;\n"
          "\t\t\tbackground: #cccccc;\n"
          "\t\t\tmargin: 1px;\n"
          "\t\t\tpadding:0;\n"
          "\t\t}\n"
          "\t\t\n"
          "\t\t.press {\n"
          "\t\t\tborder-top: 1px solid buttonshadow;\n"
          "\t\t\tborder-left: 1px solid buttonshadow;\n"
          "\t\t\tborder-bottom: 1px solid buttonhighlight;\n"
          "\t\t\tborder-right: 1px solid buttonhighlight;\n"
          "\t\t\tbackground: #cccccc;\n"
          "\t\t\tmargin: 1px;\n"
          "\t\t\tpadding:0;\n"
          "\t\t}\t\n"
          "\t\t\n"
          "\t\t#toolbar {\n"
          "\t\t\tmargin: 0;\n"
          "\t\t\tpadding: 1px;\n"
          "\t\t\twidth:250px;\n"
          "\t\t\ttext-align:center;\n"
          "\t\t\tborder: 1px solid #000000;\n"
          "\t\t}\n"
          "\t\t#toolbar h3 {display:none;}\n"
          "\t\t#toolbar p {margin:0;padding:0;text-indent:0;}\n"
          "\t</style>\n"
          "\t<script src="file:///~/hatena.js" language="JavaScript" type="text/javascript"></script>\n"
          "\n"
          "\n"
Name = "?D Edit JavaScript2"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/*/edit"
Limit = 256
Match = "<body>"
Replace = "\n"
          "<body onload="thisForm=document.frmTest;">\n"
          "\n"
Name = "?D Edit JavaScript3"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/*/edit"
Limit = 256
Match = "<form method="post" action="./edit" enctype="multipart/form-data">"
Replace = "\n"
          "<form method="post" action="./edit" enctype="multipart/form-data" id="frmTest" name="frmTest">\n"
          "\n"
Name = "?D Edit JavaScript4"
Active = TRUE
URL = "(diary|d).hatena.ne.jp/*/edit"
Limit = 256
Match = "</textarea><br>"
Replace = "</textarea><br>\n"
          "\n"
          "<div id="toolbar">\n"
          "\t<h3>Toolbar</h3>\n"
          "\t<p>\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelection(thisForm.body,'<em>','</em>');" src="file:///~/em.gif" width="32" height="16" align="middle"\n"
          "\ttitle="click to make your text selection emphatic (or type control-shift-e)">\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelection(thisForm.body,'<strong>','</strong>');" src="file:///~/strong.gif" width="32" height="16" align="middle"\n"
          "\ttitle="click to make your text selection strong (or type control-shift-s)">\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelectionWithLink(thisForm.body);" src="file:///~/link.gif" width="32" height="16" align="middle" \n"
          "\ttitle="click to add a link to the selected text (or type control-shift-a)">\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelectionWithBlockQuote(thisForm.body);" src="\file:///~/bq.gif" width="32" height="16" align="middle" \n"
          "\ttitle="click to add a blockquote (or type control-shift-b)">\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelectionWithRuby(thisForm.body);" src="file:///~/ruby.gif" width="32" height="16" align="middle" \n"
          "\ttitle="click to add a ruby to the selected text (or type control-shift-x)">\n"
          "\t<img class="buttons" onmouseover="mouseover(this);" onmouseout="mouseout(this);" \n"
          "\tonmousedown="mousedown(this);" onmouseup="mouseup(this);" \n"
          "\tonclick="wrapSelectionWithPre(thisForm.body);" src="file:///~/pre.gif" width="32" height="16" align="middle" \n"
          "\ttitle="click to add a pre to the selected text (or type control-shift-p)">\n"
          "\t</p>\n"
          "</div>"
          "\n"

*1:例:「file:///D:/hatena/hatena.js」

*2:例:「http://186.bz/hatena/edit/hatena.js