Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- if("?f=1&mode=newtopic" == location.search)
- {
- $('input[name="post"]').click(function(e) {
- e.preventDefault();
- var form = $('form[action="/post"]'),
- datax = [];
- datax['username'] = _userdata.username;
- datax['topic_image'] = 'http://i39.servimg.com/u/f39/15/42/26/78/import10.png';
- datax['content'] = $('.sceditor-container textarea').val();
- datax['topic_title'] = $('input[name="subject"]', form).val();
- if(datax.username !== "Zeus" || datax.username !== "SSYT") datax['author'] = "Zeus" ? "Zeus" : "SSYT"; else datax['author'] = datax.username;
- $.post('/post?f=1&mode=newtopic', {
- "message" : datax.content,
- "auth[]": $("input[name='auth[]']:last", form).val(),
- "lt" : $("input[name='lt']", form).val(),
- "f" : $("input[name='f']", form).val(),
- "mode" : "newtopic",
- "post": "Send"
- }, function(t) {
- if($(t).find(".message a:first").attr('href').length > 1) {
- datax['topic_url'] = location.href;
- console.log(f);
- datax['data'] = "&topic_image="+ datax.topic_image +"&content"+ datax.content +"&topic_title="+ datax.topic_title +"&author="+ author +"&topic_url="+datax.topic_url;
- $.ajax({
- type: "post",
- url: "aici vine url !",
- data: datax.data,
- });
- }
- });
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement