From: David ‘Bombe’ Roden Date: Sat, 27 Nov 2010 15:07:18 +0000 (+0100) Subject: Add method to detect whether we’re on the “known Sones” page. X-Git-Tag: 0.3.2-RC1~18 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=8d9ee18ba471106f59da6e8399aafcff59952e19 Add method to detect whether we’re on the “known Sones” page. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 60a3848..66aa236 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -660,6 +660,16 @@ function getShownPostId() { return $("#sone .post-id").text(); } +/** + * Returns whether the current page is the “known Sones” page. + * + * @returns {Boolean} true if the current page is the “known + * Sones” page, false otherwise + */ +function isKnownSonesPage() { + return getPageId() == "known-sones"; +} + var loadedPosts = {}; var loadedReplies = {}; diff --git a/src/main/resources/templates/knownSones.html b/src/main/resources/templates/knownSones.html index 4520967..f5907a0 100644 --- a/src/main/resources/templates/knownSones.html +++ b/src/main/resources/templates/knownSones.html @@ -1,5 +1,7 @@ <%include include/head.html> + +

<%= Page.KnownSones.Page.Title|l10n|html>