Get the XHR post url dynamically.
This commit is contained in:
parent
b6a0ccd8dd
commit
e28c668fc5
@ -1885,7 +1885,7 @@
|
||||
Watcher.watch(threadID);
|
||||
}
|
||||
post = {
|
||||
board: g.BOARD,
|
||||
postURL: $('form[name=post]').action,
|
||||
resto: threadID,
|
||||
name: reply.name,
|
||||
email: reply.email,
|
||||
@ -2020,8 +2020,8 @@
|
||||
},
|
||||
post: function(data) {
|
||||
var boundary, callbacks, form, i, name, opts, parts, toBin, url, val;
|
||||
url = "https://sys.4chan.org/" + data.board + "/post";
|
||||
delete data.board;
|
||||
url = data.postURL;
|
||||
delete data.postURL;
|
||||
if (engine === 'gecko' && data.upfile) {
|
||||
if (!data.binary) {
|
||||
toBin = function(data, name, val) {
|
||||
@ -2050,7 +2050,7 @@
|
||||
toBin(data, name, val);
|
||||
}
|
||||
}
|
||||
data.board = url.split('/')[3];
|
||||
data.postURL = url;
|
||||
data.binary = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1563,7 +1563,7 @@ qr =
|
||||
Watcher.watch threadID
|
||||
|
||||
post =
|
||||
board: g.BOARD
|
||||
postURL: $('form[name=post]').action
|
||||
resto: threadID
|
||||
name: reply.name
|
||||
email: reply.email
|
||||
@ -1694,9 +1694,9 @@ qr =
|
||||
|
||||
post: (data) ->
|
||||
|
||||
url = "https://sys.4chan.org/#{data.board}/post"
|
||||
url = data.postURL
|
||||
# Do not append these values to the form.
|
||||
delete data.board
|
||||
delete data.postURL
|
||||
|
||||
# File with filename upload fix from desuwa
|
||||
if engine is 'gecko' and data.upfile
|
||||
@ -1722,8 +1722,8 @@ qr =
|
||||
i--
|
||||
else
|
||||
toBin data, name, val
|
||||
data.board = url.split('/')[3]
|
||||
data.binary = true
|
||||
data.postURL = url
|
||||
data.binary = true
|
||||
return
|
||||
|
||||
delete data.binary
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user