src = """
(function() {
    var initialX = 0;
    var initialY = 0;

    function onMouseMove(ev) {
        var x = ev.screenX - initialX;
        var y = ev.screenY - initialY;
        window.pywebview._bridge.call('moveWindow', [x, y], 'move');
    }

    function onMouseUp() {
        window.removeEventListener('mousemove', onMouseMove);
    }

    function onMouseDown(ev) {
        initialX = ev.clientX;
        initialY = ev.clientY;
        window.addEventListener('mouseup', onMouseUp);
        window.addEventListener('mousemove', onMouseMove);
    }

    var dragBlocks = document.querySelectorAll('%s');
    dragBlocks.forEach(function(dragBlock) {
        dragBlock.addEventListener('mousedown', onMouseDown);
    });
})();
"""

@@ -619,45 +619,47 @@
     
-dragBlocks.forEach(function(dragBlock
+for(var i=0; i %3C dragBlocks.length; i++
 ) %7B%0A
@@ -675,16 +675,20 @@
 ragBlock
+s%5Bi%5D
 .addEven
@@ -729,18 +729,16 @@
 );%0A    %7D
-);
 %0A%7D)();%0A%22

Use old JS for loop over forEach for backwards compatibility.