+ var action = cb.prop('checked') ? 'check' : 'clear';
+ var now = new Date();
+ var since_last_action = now - last_item_action_stamp;
+
+ console.debug(action, last_item_action, now - last_item_action_stamp, item_action_streak);
+ if (last_item_action
+ && last_item_action == action
+ && since_last_action < 3000)
+ {
+ item_action_streak ++;
+
+ if (item_action_streak > 2
+ && ( action == 'check' && $('#list-items input[type="checkbox"]').not(':checked').length
+ || action == 'clear' && $('#list-items input[type="checkbox"]').filter(':checked').length
+ )
+ ) {
+ var box = $('#item-multi-action')
+ .removeClass('checking clearing')
+ .addClass(action+'ing')
+ .addClass('in-view');
+ reposition_item_multi_action();
+ var old_timer = box.data('lsl-hide-timer');
+ if (old_timer)
+ window.clearTimeout(old_timer);
+
+ box.data('lsl-hide-timer', window.setTimeout(() => {
+ box.removeClass('in-view').data('lsl-hide-timer', false);
+ }, 3000));
+ }
+ }
+ else {
+ item_action_streak = 1;
+ }
+
+ last_item_action = action;
+ last_item_action_stamp = now;
+