Void_Knight

Thank-you changing code

Aug 10th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tys = $('.kmessage-thankyou');
  2.  
  3. for (var i = 0; i < tys.length; i++)
  4. {
  5.     var src = $(tys[i]);
  6.     var oldHTML = src.html();
  7.     var re = /and this user have (\d+) others thankyou/;
  8.     oldHTML = oldHTML.replace(re, "+ $1 other(s)");
  9.     oldHTML = oldHTML.replace(/The following user\(s\) said Thank You:/,"Users that have thanked this post: ");
  10.     src.html(oldHTML);
  11. }
Add Comment
Please, Sign In to add comment