From 8f7287d2efa67700d3d6674c3520c4b8fb973103 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 13 Jan 2011 14:55:13 +0100 Subject: [PATCH] Add function to extract ID of current Sone from HTML. --- src/main/resources/static/javascript/sone.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index ccf7149..f7a686d 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -604,6 +604,16 @@ function getStatus() { } /** + * Returns the ID of the currently logged in Sone. + * + * @return The ID of the current Sone, or an empty string if no Sone is logged + * in + */ +function getCurrentSoneId() { + return $("#currentSoneId").text(); +} + +/** * Returns the content of the page-id attribute. * * @returns The page ID -- 2.7.4