Advertisement
SSYT

Nushm blog stefan !

May 12th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     if("?f=1&mode=newtopic" == location.search)
  3.     {
  4.         $('input[name="post"]').click(function(e) {
  5.             e.preventDefault();
  6.             var form = $('form[action="/post"]'),
  7.             datax = [];
  8.            
  9.             datax['username'] = _userdata.username;
  10.             datax['topic_image'] = 'http://i39.servimg.com/u/f39/15/42/26/78/import10.png';
  11.             datax['content'] = $('.sceditor-container textarea').val();
  12.             datax['topic_title'] = $('input[name="subject"]', form).val();
  13.             if(datax.username !== "Zeus" || datax.username !== "SSYT") datax['author'] = "Zeus" ? "Zeus" : "SSYT"; else datax['author'] = datax.username;
  14.            
  15.             $.post('/post?f=1&mode=newtopic', {
  16.                 "message" : datax.content,
  17.                 "auth[]": $("input[name='auth[]']:last", form).val(),
  18.                 "lt" : $("input[name='lt']", form).val(),
  19.                 "f" : $("input[name='f']", form).val(),
  20.                 "mode" : "newtopic",
  21.                 "post": "Send"
  22.             }, function(t) {
  23.                 if($(t).find(".message a:first").attr('href').length > 1) {
  24.                     datax['topic_url'] = location.href;
  25.                     console.log(f);
  26.                     datax['data'] = "&topic_image="+ datax.topic_image +"&content"+ datax.content +"&topic_title="+ datax.topic_title +"&author="+ author +"&topic_url="+datax.topic_url;
  27.                     $.ajax({
  28.                         type: "post",
  29.                         url: "aici vine url !",
  30.                         data: datax.data,
  31.                     });
  32.                 }
  33.             });
  34.         });
  35.     }
  36. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement