Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. $(document).ready(function() {
  2. $('.postprofile dl').each(function() {
  3. $(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
  4. });
  5. $('.postprofile dl .post_field:contains("Reputação")').each(function() {
  6. var rep = $(this).text().match(/\d+/g);
  7. var rank = '';
  8. $(this).addClass('reputation');
  9. $(this).append('<span class="title" style="font-weight:normal"></span>');
  10. if(rep == 0) {
  11. rank = 'Neutro';
  12. $(this).addClass('zero');
  13. }
  14. else if(rep >= 1 && rep < 5) {
  15. rank = 'Iniciante';
  16. }
  17. else if(rep >= 5 && rep < 10) {
  18. rank = 'Membro ativo';
  19. }
  20. else if(rep >= 10) {
  21. rank = 'Excelente';
  22. }
  23. $('.title', this).text(rank);
  24. });
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement