User:Thparkth/CommentsInLocalTime.js: Difference between revisions

Content deleted Content added
regexp fix alone
put the regexp fix back in
 
(3 intermediate revisions by the same user not shown)
Line 194:
function wrapTimestamps() {
var prefixNode;
var loopEscapeCounter = 0; // we'll break out if the while loop runs more than 5,000 times to avoid a browser hang
while ((prefixNode = iter.nextNode())) {
if (loopEscapeCounter++ > 5000) { // escape infinite loop
console.log("ERROR: CommentsInLocalTime.js loop breakout in wrapTimestamps()");
break;
}
 
var result = LocalComments.parseRegExp.exec(prefixNode.data);
if (!result) continue;