aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
+ );
}
}