Add method to detect whether we’re on the “known Sones” page.
[Sone.git] / src / main / resources / static / javascript / sone.js
index 60a3848..66aa236 100644 (file)
@@ -660,6 +660,16 @@ function getShownPostId() {
        return $("#sone .post-id").text();
 }
 
+/**
+ * Returns whether the current page is the “known Sones” page.
+ *
+ * @returns {Boolean} <code>true</code> if the current page is the “known
+ *          Sones” page, <code>false</code> otherwise
+ */
+function isKnownSonesPage() {
+       return getPageId() == "known-sones";
+}
+
 var loadedPosts = {};
 var loadedReplies = {};