aboutsummaryrefslogtreecommitdiffstats
path: root/migemized_find.js
diff options
context:
space:
mode:
authoranekos2011-09-01 18:34:10 +0900
committeranekos2011-09-01 18:34:10 +0900
commit5af11a142754ef72cfdbc581d0beabe7884100d0 (patch)
tree2116ab22e902f58b8aa5a0d1f23936f69266d62e /migemized_find.js
parent42661197a40d2bc78d1cf21f8056db88f5a14857 (diff)
downloadvimperator-plugins-5af11a142754ef72cfdbc581d0beabe7884100d0.tar.bz2
履歴を保存するように
Diffstat (limited to 'migemized_find.js')
-rw-r--r--migemized_find.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/migemized_find.js b/migemized_find.js
index 8adc6dd..49d34aa 100644
--- a/migemized_find.js
+++ b/migemized_find.js
@@ -39,7 +39,7 @@ let PLUGIN_INFO =
<name lang="ja">Migemized Find</name>
<description>Migemize default page search.</description>
<description lang="ja">デフォルトのドキュメント内検索をミゲマイズする。</description>
- <version>2.11.1</version>
+ <version>2.11.2</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<license>new BSD License (Please read the source code comments of this plugin)</license>
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
@@ -236,6 +236,8 @@ let PLUGIN_INFO =
for each ([name, value] in Iterator(colors))
];
+ let store = storage.newMap(__context__.NAME, {store: true});
+
function s2b (s, d) (!/^(\d+|false)$/i.test(s)|parseInt(s)|!!d*2)&1<<!s;
function getPosition (elem) {
@@ -266,7 +268,7 @@ let PLUGIN_INFO =
MODE_MIGEMO: 2,
// 検索履歴
- history: [],
+ history: store.get('history', []),
// 全体で共有する変数
lastSearchText: null,
@@ -683,4 +685,9 @@ let PLUGIN_INFO =
// 外から使えるように
liberator.plugins.migemizedFind = MF;
+ // 履歴の保存
+ __context__.onUnload = function () {
+ store.set('history', MF.history.slice(0, 100));
+ };
+
})();