var $ = require('jquery');

var ActionsUpdater = function($changelist) {
    this.$changelist = $changelist;
};

ActionsUpdater.prototype = {
    removeLabel: function($actions) {
        var $input = $actions.find('[name="action"]').first();

        if ($input.length == 0) {
            return;
        }

        var $label = $input[0].previousSibling;

        if ($label.nodeType == 3) {
            $label.remove();
        }
    },
    wrapLabels: function($actions) {
        var $wrapper = $('<div>').addClass('labels');
        $actions.find('span.all, span.action-counter, span.clear, span.question')
                .wrapAll($wrapper);
    },
    moveActions: function($actions) {
        $actions.remove();

        var $paginator = this.$changelist.find('.paginator');
        var $wrapper = $('<div>').addClass('changelist-footer');

        $wrapper.insertAfter($paginator);

        $actions.remove();
        $paginator.remove();

        $wrapper.append($actions);
        $wrapper.append($paginator);
    },
    run: function() {
        var $actions = this.$changelist.find('.actions');

        try {
            this.removeLabel($actions);
            this.wrapLabels($actions);
            this.moveActions($actions);
        } catch (e) {
            console.error(e);
        }

        $actions.addClass('initialized');
    }
};

$(document).ready(function() {
    $('#changelist').each(function() {
        new ActionsUpdater($(this)).run();
    });
});

@@ -323,16 +323,18 @@
 label = 
+$(
 $input%5B0
@@ -350,16 +350,17 @@
 sSibling
+)
 ;%0A%0A     
@@ -373,16 +373,23 @@
 ($label.
+get(0).
 nodeType

Fix ie remove error