From: David ‘Bombe’ Roden Date: Thu, 13 Jan 2011 13:55:13 +0000 (+0100) Subject: Add function to extract ID of current Sone from HTML. X-Git-Tag: 0.3.7^2~5^2~5 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8f7287d2efa67700d3d6674c3520c4b8fb973103;p=Sone.git Add function to extract ID of current Sone from HTML. --- 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