How to select a lot of topics fast?

Done. Add this to <head>.

<script type="text/javascript">
$(document).ready(function() {
    if ($('button.btn.bulk-select').length) {
        var shiftOn = false;
        $(document).keydown(function (e) {
            if (e.keyCode == 16) {
                shiftOn = true;
            }
        });
        $(document).keyup(function (e) {
            if (e.keyCode == 16) {
                shiftOn = false;
            }
        });
        
        $(document).on('change', 'input.bulk-select', function() {
            
            if ((shiftOn) && ($('.start-line-bh').length)) {
                // if Shift is on and first checkbox been clicked
                var State = $('.start-line-bh input.bulk-select').prop('checked');
                $('.end-line-bh').removeClass('end-line-bh');
                $(this).parents('tr').addClass('end-line-bh');
                
                $('input.bulk-select').parents('tr').each(function() {
                    if (($(this).hasClass('start-line-bh')) || ($(this).hasClass('end-line-bh'))) {
                        if ($('.i-go-second').length) {
                            $(this).addClass('i-go-first');
                        } else {
                            $(this).addClass('i-go-second');
                        }
                    }
                });
                
            $('.i-go-first').nextUntil($('.i-go-second'), "tr" ).each(function() {
                var Obj = $(this).find('input.bulk-select');
                if (Obj.prop('checked') != State) {
                    Obj.trigger('click').prop('checked', State);
                }
            });
                
                $('.i-go-first, .i-go-second').find('input.bulk-select').prop('checked', State);
                
                $('.i-go-first').removeClass('i-go-first');
                $('.i-go-second').removeClass('i-go-second');
                
            } else {
                // if Shift is off or no checkbox been clicked yet
                $('.start-line-bh').removeClass('start-line-bh');
                $(this).parents('tr').addClass('start-line-bh');
            }
        });
    }

});
</script>

Click on some checkbox, then Shift+click on other. All checkboxes between them will take state of first clicked checkbox.

2 Likes