X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=abf3fbd68610ed5b37306600db42c1b6f2fbaf3c;hb=01189866db427f28e1f51fc52ac5cbdb2b4b5ece;hp=b8193337d5c26424592fc57fb0e52de5716b865b;hpb=1dfe9f0daba9a1103c5566b81af5bed7791dde5c;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index b819333..abf3fbd 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1088,6 +1088,14 @@ function ajaxifyNotification(notification) { } /** + * Returns the notification hash. This hash is used in {@link #getStatus()} to + * determine whether the notifications changed and need to be reloaded. + */ +public getNotificationHash() { + return $("#sone #notification-area #notification-hash").text(); +} + +/** * Retrieves element IDs from notification elements. * * @param notification @@ -1347,7 +1355,7 @@ function isViewSonePage() { * @returns The ID of the currently shown Sone */ function getShownSoneId() { - return $("#sone .sone-id").text(); + return $("#sone .sone-id").first().text(); } /**