X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=591afa022e039890d5ded16e4a53866c12a1b694;hb=67c3d6cf09d8e7784d6cc5e0c4116b12fe15dd00;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..591afa0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1088,6 +1088,24 @@ 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(); +} + +/** + * Sets the notification hash. + * + * @param notificationHash + * The new notification hash + */ +public setNotificationHash(notificationHash) { + $("#sone #notification-area #notification-hash").text(notificationHash); +} + +/** * Retrieves element IDs from notification elements. * * @param notification @@ -1347,7 +1365,7 @@ function isViewSonePage() { * @returns The ID of the currently shown Sone */ function getShownSoneId() { - return $("#sone .sone-id").text(); + return $("#sone .sone-id").first().text(); } /**