Fix DOMfilter when replacing multiple occasions

Previously, it would sometimes forget things at the end
rewrite-with-urlplugin
Lorenz Hübschle-Schneider 11 years ago
parent 1478b611da
commit 8a740b765a
  1. 6
      js/filters.js

@ -94,13 +94,15 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
} else {
parent.appendChild(newNode);
}
return newNode;
}
}
// recurse
if (node === undefined || node === null) return;
node = node.firstChild;
while (node) {
process(node);
node = node.nextSibling;
var nextNode = process(node);
node = (nextNode ? nextNode : node).nextSibling;
}
};

Loading…
Cancel
Save