From 5ca4a015cc4de0fb97cb74f0df029ae02f4fec48 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 14 Mar 2012 20:52:58 +0100 Subject: [PATCH] Update support for https with sys.4chan.org. Fix #328 --- 4chan_x.user.js | 7 ++++--- Cakefile | 1 + changelog | 2 ++ script.coffee | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d475de733..88efdb629 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -8,6 +8,7 @@ // @license MIT; http://en.wikipedia.org/wiki/Mit_license // @include http://boards.4chan.org/* // @include http://images.4chan.org/* +// @include https://sys.4chan.org/* // @include http://sys.4chan.org/* // @include http://www.4chan.org/* // @run-at document-start @@ -1260,7 +1261,7 @@ } else { iframe = $.el('iframe', { id: 'iframe', - src: 'http://sys.4chan.org/robots.txt' + src: 'https://sys.4chan.org/robots.txt' }); $.on(iframe, 'error', function() { return this.src = this.src; @@ -1269,7 +1270,7 @@ if (!qr.status.ready) { iframe.src = 'about:blank'; return setTimeout((function() { - return iframe.src = 'http://sys.4chan.org/robots.txt'; + return iframe.src = 'https://sys.4chan.org/robots.txt'; }), 100); } }; @@ -2020,7 +2021,7 @@ }, post: function(data) { var boundary, callbacks, form, i, name, opts, parts, toBin, url, val; - url = "http://sys.4chan.org/" + data.board + "/post"; + url = "https://sys.4chan.org/" + data.board + "/post"; delete data.board; if (engine === 'gecko' && data.upfile) { if (!data.binary) { diff --git a/Cakefile b/Cakefile index fa0e1a62a..45530dae0 100644 --- a/Cakefile +++ b/Cakefile @@ -15,6 +15,7 @@ HEADER = """ // @license MIT; http://en.wikipedia.org/wiki/Mit_license // @include http://boards.4chan.org/* // @include http://images.4chan.org/* +// @include https://sys.4chan.org/* // @include http://sys.4chan.org/* // @include http://www.4chan.org/* // @run-at document-start diff --git a/changelog b/changelog index e9926295d..a0322a82a 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Update posting support to use https with sys.4chan.org according to 4chan's latest change. This fixes the 'referer' error. 2.29.0 - Mayhem diff --git a/script.coffee b/script.coffee index c418964b9..d4f9e6e15 100644 --- a/script.coffee +++ b/script.coffee @@ -1036,13 +1036,13 @@ qr = else iframe = $.el 'iframe', id: 'iframe' - src: 'http://sys.4chan.org/robots.txt' + src: 'https://sys.4chan.org/robots.txt' $.on iframe, 'error', -> @src = @src # Greasemonkey ghetto fix loadChecking = (iframe) -> unless qr.status.ready iframe.src = 'about:blank' - setTimeout (-> iframe.src = 'http://sys.4chan.org/robots.txt'), 100 + setTimeout (-> iframe.src = 'https://sys.4chan.org/robots.txt'), 100 $.on iframe, 'load', -> if @src isnt 'about:blank' then setTimeout loadChecking, 500, @ $.add d.head, iframe @@ -1694,7 +1694,7 @@ qr = post: (data) -> - url = "http://sys.4chan.org/#{data.board}/post" + url = "https://sys.4chan.org/#{data.board}/post" # Do not append these values to the form. delete data.board