searchTextMarker

らくだ

検索文字強調・保存スクリプト

概要

searchTextMarker 2.10 は、ページ中の特定文字列をマークアップし、クッキーに保存し、次回訪問時にも同じ文字列を自動的にマークアップする Opera 用のユーザスクリプトです。

設置

searchTextMarker 2.10 と、 ArrayCookie2 のファイル、 @2006-04-15T20:53+09:00 sendScriptToActiveFrame のファイル をユーザスクリプトフォルダに保存し、下記のコードをユーザスタイルシートに追加して再設定してください。

?%
#searchTextMarker
{
	position:fixed !important;
	margin:0 !important;
	padding:0 !important;
	border:0 !important;
	left:0 !important;
	bottom:0 !important;
	font-size:xx-small !important;
}
#searchTextMarker div		{	color:#000 !important; margin:0 !important; padding:5px !important; border:0 !important;	width:auto !important;	}
#searchTextMarker textarea	{	text-align:nowrap !important;	display:block !important;	width:200px !important;	}
.searchTextMarker			{	font-size:inherit !important;	color:#fff !important;	background:#00f !important;	}
.searchTextMarkerRed		{	font-size:inherit !important;	color:#fff !important;	background:#f33 !important;	}
.searchTextMarkerGreen		{	font-size:inherit !important;	color:#000 !important;	background:#0f0 !important;	}
.searchTextMarkerCyan		{	font-size:inherit !important;	color:#000 !important;	background:#6ff !important;	}
.searchTextMarkerPurple		{	font-size:inherit !important;	color:#000 !important;	background:#f6f !important;	}
.searchTextMarkerYellow		{	font-size:inherit !important;	color:#009 !important;	background:#ff6 !important;	}
.searchTextMarkerGray		{	font-size:inherit !important;	color:#fff !important;	background:#999 !important;	}
.searchTextMarkerMonta		{	font-size:inherit !important;	color:#000 !important;	background:#000 !important;	}
.searchTextMarkerOutline	{	font-size:inherit !important;	outline:solid #f60 3px !important;	}
.searchTextMarkerUnderline	{	font-size:inherit !important;	text-decoration:underline !important;	}
.searchTextMarkerLarge		{	font-size:150% !important;	}
.searchTextMarkerBold		{	font-size:inherit !important;	font-weight:bold !important;	}
%?

以下のコードを、使用中の menu.ini に貼り付けてください。

?%
[Search Text Marker Menu]
Item, "青" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarker\x22,%T)');"
Item, "赤" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerRed\x22,%T)');"
Item, "緑" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerGreen\x22,%T)');"
Item, "水" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerCyan\x22,%T)');"
Item, "桃" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerPurple\x22,%T)');"
Item, "黄" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerYellow\x22,%T)');"
Item, "灰" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerGray\x22,%T)');"
Item, "検閲" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerMonta\x22,%T)');"
Item, "外枠" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerOutline\x22,%T)');"
Item, "下線" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerUnderline\x22,%T)');"
Item, "拡大" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerLarge\x22,%T)');"
Item, "太" =   Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.addMark(\x22searchTextMarkerBold\x22,%T)');"
--------------------1
Item, "フォーム" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.openForm()');"

[Search Text Marker Clear Menu]
Item, "全て削除" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clearAll()');"
--------------------2
Item, "青" = "Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarker\x22)');"
Item, "赤" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerRed\x22)');"
Item, "緑" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerGreen\x22)');"
Item, "水" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerCyan\x22)');"
Item, "桃" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerPurple\x22)');"
Item, "黄" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerYellow\x22)');"
Item, "灰" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerGray\x22)');"
Item, "検閲" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerMonta\x22)');"
Item, "外枠" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerOutline\x22)');"
Item, "下線" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerUnderline\x22)');"
Item, "拡大" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerLarge\x22)');"
Item, "太" = Copy frame address & Go to page,   "javascript:sendScriptToActiveFrame(%C,'Marker.clear(\x22searchTextMarkerBold\x22)');"
--------------------1
Item, "フォーム" = Copy frame address & Go to page, "javascript:sendScriptToActiveFrame(%C,'Marker.openForm()');"
%?

以下のコードを、[Hotclick Popup Menu]の好きな位置に追加してください。

?%
Submenu, "マーカー", Search Text Marker Menu =
%?

以下のコードを[Document Popup Menu]の好きな位置に追加してください。

?%
Submenu, "マーカーの削除", Search Text Marker Clear Menu =
%?

設定で、メニューを再設定してください。

操作

ページ上の任意の文字列を選択してください。ただし、要素をまたぐとうまくいきません。右クリックメニューの[マーカー]から、好きなマークアップを選択してください。

選択しない状態で右クリックすると、削除用のメニューが出ます。

[フォーム]で検索フォームが表示されます。 textarea フォームに文字列を入力すると、その文字列がマークアップされます。改行で区切ると、一つのマークアップを複数の文字列に適用できます。

ページ毎に設定可能ですが、上位ディレクトリで設定があると、その設定が優先されてしまいます(多分クッキーの仕様)。ブログなどではパーマリンクでマークするようにした方がいいでしょう。

更新履歴と既知の問題

2006.04.14
searchTextMarker 1.10公開。
+@2020-02-23T11:38+09:00@@2006-04-14T02:43+09:00 要望により大文字小文字を区別しないようにしました。+
+@2020-02-23T11:38+09:00@@2006-04-15T16:26+09:00 スタイルシートを、フォームが隠れるようにしました。+
searchTextMarker 1.11公開。
+@2020-02-23T11:38+09:00@@2006-04-14T12:52+09:00 正規表現の制御文字でクラッシュする問題を改善。+
@2006-04-15T16:26+09:00 検索語句に他の検索語句が含まれているとクラッシュする問題を改善。
2006.04.15
searchTextMarker 2.00公開。
かなり高機能に。
-@2020-02-23T11:38+09:00@@2006-04-24T17:02+09:00 フレームページでうまくいきません。これは、メニューの"Go to page"が、トップフレームに宛てられているためです(多分)。-
searchTextMarker 2.01公開。
フォームがうまく機能していなかったのを修正。
区切り文字を変更。
一部のフレームページが開かなかったのを修正。
2006.04.15
sendScriptToActiveForm を利用する方法に変更。
2006.04.24
searchTextMarker 2.10 公開。
区切り文字を改行にし、フォームを textarea に変更。
スタイルシートを変更。
Usertime : 0.07 / Systemtime : 0.02