Advertisement
Guest User

НАОРАТЬ НА ФОЖЖЕРА

a guest
Apr 15th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function update_fojjer(shouts) {
  2.     $('button.fojjer').each(function(index) {
  3.         var text = (Math.random() < 0.5? 'ФОЖЖЖЖЖЕЕР!!! ': '8-[  =  ] !!! ') + shouts
  4.         $(this).text(text)
  5.     })
  6. }
  7.  
  8.  
  9. function setup_fojjer()
  10. {
  11.     var text = 'НАОРАТЬ НА ФОЖЖЕРА'
  12.     var suffixes = ['??', '?', '!', '!!11', '??!', '?!']
  13.     $('button.fojjer').each(function(index) {
  14.         var suffix = suffixes[Math.floor(Math.random() * suffixes.length)];
  15.         $(this).text(text + suffix)
  16.         $(this).addClass('button')
  17.         $(this).click(function() {
  18.             $.post('/fojjer.php', 'shout=1', function(data) {
  19.                 update_fojjer(data)
  20.             })
  21.         })
  22.     })
  23. }
  24.  
  25. function FOJJJJJERRRR() {
  26.     $('a').each(function(index) {
  27.         if (Math.random() >= 0.25)
  28.             return
  29.         $(this).after($('<button class="fojjer"></button>'))
  30.     })
  31.     setup_fojjer();
  32. }
  33.  
  34. $(document).ready(function() {
  35.     FOJJJJJERRRR();
  36. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement