Firefoxのラインマーカーアドオンの色をカスタマイズする
普段、本を読んでいるときは、三色ボールペン情報活用術風に以下のように下線を引いている。
- 赤:最重要。(客観的に)
- 青:重要。(客観的に)
- 緑:興味があるところ。(主観)
Firefoxでラインマーカーを使用しているのだが、黄色で囲み線を使ってたが、
本と同じく、赤、青、緑の下線を使いたくなった。
変更するには?
http://piro.sakura.ne.jp/xul/_linemarker.html より
テキストを選択した状態でコンテキストメニューを開くと、マーカーを指定するための
項目が表示されます。使用する配色のカスタマイズ方法は、プロファイユーザー
プロファイルフォルダに自動生成される「linemarker.rdf」を参照して下さい。
linemarker.rdfの変更
プロファイユーザープロファイルフォルダはWindows XPなのでここにある
C:\Documents and Settings\orangeclover\Application Data\Mozilla\Firefox\Profiles\8neith76.oc
てっきりこれを変更すればいいのかと思ったのだが、変更して、Firefoxを再起動しても
ラインマーカーのメニューが変わらない。
消したらエラーになるかなと思い、リネームして再起動したら、自動生成された。
参照用であって、カスタマイズ用ではないということか?
実際に使用されてるのは?
実際に使用されてるのは、このjarの中のファイルなのかな?
プロファイユーザープロファイルフォルダ └─{3354F302-9928-4b07-B947-82F65A8FF70D} │ └─chrome │ └─linemarker.jar
解凍
解凍してみた。
[C:\Documents and Settings\orangeclover\Application Data\Mozilla\Firefox\Profiles\8neith76.oc\extensions\{3354F302-9928-4b07-B947-82F65A8FF70D}\chrome]jar -xvf linemarker.jar
フォルダ構成
以下のように、linemarker.rdfは4つある。
プロファイユーザープロファイルフォルダ ├─linemarker.rdf・・・・・・・・・・・・・・・・・・・・(1) └─{3354F302-9928-4b07-B947-82F65A8FF70D} │ └─chrome │ ├─content │ └─linemarker │ │ │ └─linemarker.rdf・・・・・・・・・・・・(2) └─locale │ ├─en-US │ └─linemarker │ │ │ └─linemarker.rdf・・・・・・・・・・(3) │ └─ja-JP │ └─linemarker │ └─linemarker.rdf・・・・・・・・・・(4)
それぞれの役割(?)
(1)参考用
参照用のようなので、変更しても変わらない(変わらなかった。)
(2)カスタイズ用
これを変えるとデフォルトのメニューに、この変更分が追加される。
つまり、(4)+(2)がメニューに表示される状態になる。
(4)+(2)の重複分は1つしか表示されない。
(4)日本語ロケールのデフォルト
日本語ロケールのデフォルト値
(1)の元になってるファイル?
なので、(1)と(2)と(4)を以下の設定に変えた。
<?xml version="1.0"?> <RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:LM="http://www.cc-net.or.jp/~piro/linemarker#"> <!-- ラインマーカー 1.0 マーカー色定義ファイル --> <!-- ***** BEGIN LICENSE BLOCK ***** - Version: MPL 1.1/GPL 2.0/LGPL 2.1 - - The contents of this file are subject to the Mozilla Public License Version - 1.1 (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" basis, - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - for the specific language governing rights and limitations under the - License. - - The Original Code is the Line Marker. - - The Initial Developer of the Original Code is SHIMODA Hiroshi. - Portions created by the Initial Developer are Copyright (C) 2002-2006 - the Initial Developer. All Rights Reserved. - - Contributor(s): SHIMODA Hiroshi <piro@p.club.ne.jp> - - Alternatively, the contents of this file may be used under the terms of - either the GNU General Public License Version 2 or later (the "GPL"), or - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - in which case the provisions of the GPL or the LGPL are applicable instead - of those above. If you wish to allow use of your version of this file only - under the terms of either the GPL or the LGPL, and not to allow others to - use your version of this file under the terms of the MPL, indicate your - decision by deleting the provisions above and replace them with the notice - and other provisions required by the LGPL or the GPL. If you do not delete - the provisions above, a recipient may use your version of this file under - the terms of any one of the MPL, the GPL or the LGPL. - - ***** END LICENSE BLOCK ***** --> <RDF:Seq about="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:root"> <!-- Sample: <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:色名1" LM:Name="色名1" LM:Forward="white" LM:Background="rgb(0, 80, 80)"/> </RDF:li> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:色名2" LM:Name="色名2" LM:Forward="#FFFFFF" LM:Background="rgb(10%, 20%, 20%)"/> </RDF:li> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:スタイル名" LM:Name="スタイル名" LM:Style="outline: orange dotted medium; -moz-outline: orange dotted medium !important; background: yellow !important; color: black !important;"/> </RDF:li> 色はCSSの書式で指定して下さい。 色名に日本語を使う場合、UTF-8で保存する必要があります。 --> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:下線黄緑" LM:Name="下線黄緑" LM:Style="border-bottom: #00FF00 medium solid !important;"/> </RDF:li> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:下線青" LM:Name="下線青" LM:Style="border-bottom: #0000FF medium solid !important;"/> </RDF:li> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:下線赤" LM:Name="下線赤" LM:Style="border-bottom: #FF0000 medium solid !important;"/> </RDF:li> <RDF:li> <RDF:Description ID="chrome://linemarker/content/linemarker.rdf#urn:ColorSet:スタイル2" LM:Name="スタイル2" LM:Style="border: orange dotted medium !important; background: yellow !important; color: black !important;"/> </RDF:li> </RDF:Seq> </RDF:RDF>
jar化
変更を加えたものを再びjarにする。
[C:\Documents and Settings\orangeclover\Application Data\Mozilla\Firefox\Profiles\8neith76.oc\extensions\{3354F302-9928-4b07-B947-82F65A8FF70D}\chrome]jar -cvf linemarker.jar content locale skin