}
function getStatus() {
- ajaxGet("getStatus.ajax", isViewSonePage() ? {"soneIds": getShownSoneId() } : {"loadAllSones": isKnownSonesPage()}, function(data, textStatus) {
+ ajaxGet("getStatus.ajax", isViewSonePage() ? {"soneIds": getShownSoneId() } : isKnownSonesPage() ? {"soneIds": getShownSoneIds() } : {}, function(data, textStatus) {
if ((data != null) && data.success) {
/* process Sone information. */
$.each(data.sones, function(index, value) {
}
/**
+ * Returns the ID of all currently visible Sones. This is mainly used on the
+ * “Known Sones” page.
+ *
+ * @returns The ID of the currently shown Sones
+ */
+function getShownSoneIds() {
+ var soneIds = new Array();
+ $("#sone #known-sones .sone .id").each(function() {
+ soneIds.push($(this).text());
+ });
+ return soneIds.join(",");
+}
+
+/**
* Returns whether the current page is a “view post” page.
*
* @returns {Boolean} <code>true</code> if the current page is a “view post”