Advertisement
Guest User

cutucada tentativa

a guest
May 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. window.location.pathname.match(/\/u\d+/) && $(function() {
  2. if (!_userdata.session_logged_in) return;
  3. var lang = {
  4. poke : 'Cutucar',
  5. message : 'Você foi cutucado !'
  6. },
  7. a = document.createElement('DIV'), b = poke(window.location.pathname.match(/u(\d+)/)[1], document.title.match(/.*? - (.*)/)[1]), c = document.getElementById('profile-advanced-right') || document.getElementById('page-body');
  8. a.style.textAlign = 'right';
  9. a.appendChild(b);
  10. c.insertBefore(a,c.firstChild);
  11.  
  12. function poke(id, unm) {
  13. var a = document.createElement('A');
  14. if (id == _userdata.user_id) return a;
  15. nome: 'Nome do usuário:',
  16. titulo: 'Título da mensagem:',
  17. message: 'Você foi cutucado:'
  18. };
  19. var user = prompt(MP.nome).replace(/\s/g,'+');
  20. var title = prompt(MP.titulo).replace(/\s/g,'+');
  21. var message = prompt(MP.message).replace(/\s/g,'+');
  22. jQuery.post('/privmsg', {
  23. folder: 'inbox',
  24. mode: 'post',
  25. post: '1',
  26. username: user,
  27. subject: title,
  28. message: message
  29. }).done(function () {
  30. console.log("Enviado");
  31. }).fail(function () {
  32. console.log("Erro");
  33. });
  34. });
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement