teshiron / davt

Darkwind's Anti-Vandal Tool
0 stars 0 forks source link

Revert-and-warn does not use correct level #27

Closed teshiron closed 9 years ago

teshiron commented 9 years ago

For some reason, revert-and-warn is only leaving lvl 1 warnings regardless of existing content on the user's talk page.

teshiron commented 9 years ago

All browsers were affected in the case where there was only one warning on the page; this was due to using the .test() method on the warning detection regex followed by .exec() to extract the match without resetting the regex lastIndex.

Additionally, Safari was unable to correctly detect prior warnings at all due to poor Date.parse implementation.

Both of these issues should be fixed, pending testing.