diff options
author | Andrew Dolgov <[email protected]> | 2013-03-27 09:40:07 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-27 09:40:07 +0400 |
commit | f822a8e56c747a168e69c73d8519d8b08b3ae809 (patch) | |
tree | b9ed1f6ac1fe54bde7562ccc74abdfbaba3b0864 /js/functions.js | |
parent | 260501fddde2998647fbca0b80d0d9903b0578b3 (diff) |
experimentally rebase labels; make base index configurable
Diffstat (limited to 'js/functions.js')
-rw-r--r-- | js/functions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/functions.js b/js/functions.js index a9367da60..fcf82a8ea 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2,6 +2,7 @@ var notify_silent = false; var loading_progress = 0; var sanity_check_done = false; var init_params = {}; +var _label_base_index = -1024; Ajax.Base.prototype.initialize = Ajax.Base.prototype.initialize.wrap( function (callOriginal, options) { @@ -1986,3 +1987,13 @@ function htmlspecialchars_decode (string, quote_style) { return string; } + + +function label_to_feed_id(label) { + return _label_base_index - 1 - Math.abs(label); +} + +function feed_to_label_id(feed) { + return _label_base_index - 1 + Math.abs(feed); +} + |