aboutsummaryrefslogtreecommitdiffstats
path: root/foxage2ch.js
diff options
context:
space:
mode:
authoranekos2011-02-03 19:08:44 +0900
committeranekos2011-02-03 19:08:44 +0900
commit727c9e774c592da458460ecab57e1345bef7c7a5 (patch)
tree07074b14ac56e40bb42fa9f40a76d88697420816 /foxage2ch.js
parent9dca817f3c72c7830974054ad50d8545f30053a5 (diff)
downloadvimperator-plugins-727c9e774c592da458460ecab57e1345bef7c7a5.tar.bz2
次スレッドの検索関数追加
Diffstat (limited to 'foxage2ch.js')
-rw-r--r--foxage2ch.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/foxage2ch.js b/foxage2ch.js
index 2ae07c8..876748f 100644
--- a/foxage2ch.js
+++ b/foxage2ch.js
@@ -137,6 +137,27 @@ let INFO =
return thread;
}
return;
+ },
+ titleToId: function (title) {
+ for ([, thread] in Iterator(FA.threads)) {
+ if (thread.title === title)
+ return thread;
+ }
+ return;
+ },
+ findThread: function (threadId) {
+ if (!threadId) {
+ let thread = FA.titleToId(buffer.title);
+ if (!thread)
+ return;
+ threadId = thread.id;
+ }
+ window.openDialog(
+ 'chrome://foxage2ch/content/findThread.xul',
+ 'FoxAge2ch:FindThread',
+ 'chrome,centerscreen,modal,all',
+ threadId
+ );
}
}