]> git.wh0rd.org - tt-rss.git/blobdiff - js/functions.js
experimentally rebase labels; make base index configurable
[tt-rss.git] / js / functions.js
index a9367da60704e4f14c00794adf087a135d3cfb9d..fcf82a8eacddca7fcb8794aa6b722c7f9c9ebdfb 100644 (file)
@@ -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);
+}
+