Update support for https with sys.4chan.org. Fix #328
This commit is contained in:
parent
1e6e4743dc
commit
5ca4a015cc
@ -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) {
|
||||
|
||||
1
Cakefile
1
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user