From 727c9e774c592da458460ecab57e1345bef7c7a5 Mon Sep 17 00:00:00 2001 From: anekos Date: Thu, 3 Feb 2011 19:08:44 +0900 Subject: 次スレッドの検索関数追加 --- foxage2ch.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'foxage2ch.js') 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 + ); } } -- cgit v1.2.3