From 8d9ee18ba471106f59da6e8399aafcff59952e19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 27 Nov 2010 16:07:18 +0100 Subject: [PATCH] =?utf8?q?Add=20method=20to=20detect=20whether=20we?= =?utf8?q?=E2=80=99re=20on=20the=20=E2=80=9Cknown=20Sones=E2=80=9D=20page.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/javascript/sone.js | 10 ++++++++++ src/main/resources/templates/knownSones.html | 2 ++ 2 files changed, 12 insertions(+) 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>

-- 2.7.4