From c8514d1029508cb929a27c73f0c475b63af585f6 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 17 Jan 2014 16:24:49 -0700 Subject: [PATCH] Fix posting when navigating to new boards via JSON --- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Posting/QR.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 4959536ae..50d08562d 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -6206,7 +6206,7 @@ } } }; - QR.req = $.ajax($.id('postForm').parentNode.action, options, extra); + QR.req = $.ajax("//sys.4chan.org/" + g.BOARD + "/post", options, extra); QR.req.uploadStartTime = Date.now(); QR.req.progress = '...'; return QR.status(); diff --git a/builds/crx/script.js b/builds/crx/script.js index 859700681..b075a3689 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -6197,7 +6197,7 @@ } } }; - QR.req = $.ajax($.id('postForm').parentNode.action, options, extra); + QR.req = $.ajax("//sys.4chan.org/" + g.BOARD + "/post", options, extra); QR.req.uploadStartTime = Date.now(); QR.req.progress = '...'; return QR.status(); diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 122fb6927..962362442 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -570,7 +570,7 @@ QR = QR.req.progress = "#{Math.round e.loaded / e.total * 100}%" QR.status() - QR.req = $.ajax $.id('postForm').parentNode.action, options, extra + QR.req = $.ajax "//sys.4chan.org/#{g.BOARD}/post", options, extra # Starting to upload might take some time. # Provide some feedback that we're starting to submit. QR.req.uploadStartTime = Date.now()