Add https support.
This commit is contained in:
parent
58a7033aa6
commit
b6a0ccd8dd
@ -6,11 +6,10 @@
|
|||||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||||
// @copyright 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
// @copyright 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
||||||
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
||||||
// @include http://boards.4chan.org/*
|
// @include http*://boards.4chan.org/*
|
||||||
// @include http://images.4chan.org/*
|
// @include http*://images.4chan.org/*
|
||||||
// @include https://sys.4chan.org/*
|
// @include http*://sys.4chan.org/*
|
||||||
// @include http://sys.4chan.org/*
|
// @include http*://www.4chan.org/*
|
||||||
// @include http://www.4chan.org/*
|
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js
|
// @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js
|
||||||
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
|
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
|
||||||
@ -1125,7 +1124,7 @@
|
|||||||
open: function(thread, tab) {
|
open: function(thread, tab) {
|
||||||
var id, url;
|
var id, url;
|
||||||
id = thread.firstChild.id;
|
id = thread.firstChild.id;
|
||||||
url = "http://boards.4chan.org/" + g.BOARD + "/res/" + id;
|
url = "//boards.4chan.org/" + g.BOARD + "/res/" + id;
|
||||||
if (tab) {
|
if (tab) {
|
||||||
return $.open(url);
|
return $.open(url);
|
||||||
} else {
|
} else {
|
||||||
@ -1971,7 +1970,7 @@
|
|||||||
qr.cooldown.auto = qr.replies.length > 1;
|
qr.cooldown.auto = qr.replies.length > 1;
|
||||||
qr.cooldown.set(/sage/i.test(reply.email) ? 60 : 30);
|
qr.cooldown.set(/sage/i.test(reply.email) ? 60 : 30);
|
||||||
if (conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto) {
|
if (conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto) {
|
||||||
$.open("http://boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + postNumber);
|
$.open("//boards.4chan.org/" + g.BOARD + "/res/" + thread + "#" + postNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (conf['Persistent QR'] || qr.cooldown.auto) {
|
if (conf['Persistent QR'] || qr.cooldown.auto) {
|
||||||
@ -2832,7 +2831,7 @@
|
|||||||
if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return;
|
if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return;
|
||||||
img.removeAttribute('height');
|
img.removeAttribute('height');
|
||||||
img.removeAttribute('width');
|
img.removeAttribute('width');
|
||||||
return img.src = "http://thumbs.4chan.org" + (img.parentNode.pathname.replace(/src(\/\d+).+$/, 'thumb$1s.jpg'));
|
return img.src = "//thumbs.4chan.org" + (img.parentNode.pathname.replace(/src(\/\d+).+$/, 'thumb$1s.jpg'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3399,7 +3398,7 @@
|
|||||||
},
|
},
|
||||||
report: function() {
|
report: function() {
|
||||||
var id, set, url;
|
var id, set, url;
|
||||||
url = "http://sys.4chan.org/" + g.BOARD + "/imgboard.php?mode=report&no=" + ($.x('preceding-sibling::input', this).name);
|
url = "//sys.4chan.org/" + g.BOARD + "/imgboard.php?mode=report&no=" + ($.x('preceding-sibling::input', this).name);
|
||||||
id = Date.now();
|
id = Date.now();
|
||||||
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200";
|
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200";
|
||||||
return window.open(url, id, set);
|
return window.open(url, id, set);
|
||||||
@ -3597,7 +3596,7 @@
|
|||||||
return "http://archive.no-ip.org/" + board + "/" + mode + "/" + id;
|
return "http://archive.no-ip.org/" + board + "/" + mode + "/" + id;
|
||||||
default:
|
default:
|
||||||
if (mode === 'thread') {
|
if (mode === 'thread') {
|
||||||
return "http://boards.4chan.org/" + board + "/";
|
return "//boards.4chan.org/" + board + "/";
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
9
Cakefile
9
Cakefile
@ -13,11 +13,10 @@ HEADER = """
|
|||||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||||
// @copyright 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
// @copyright 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
||||||
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
// @license MIT; http://en.wikipedia.org/wiki/Mit_license
|
||||||
// @include http://boards.4chan.org/*
|
// @include http*://boards.4chan.org/*
|
||||||
// @include http://images.4chan.org/*
|
// @include http*://images.4chan.org/*
|
||||||
// @include https://sys.4chan.org/*
|
// @include http*://sys.4chan.org/*
|
||||||
// @include http://sys.4chan.org/*
|
// @include http*://www.4chan.org/*
|
||||||
// @include http://www.4chan.org/*
|
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js
|
// @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js
|
||||||
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
|
// @icon http://mayhemydg.github.com/4chan-x/favicon.gif
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
master
|
master
|
||||||
|
- Mayhem
|
||||||
|
Now works when using https.
|
||||||
|
|
||||||
2.29.1
|
2.29.1
|
||||||
- Mayhem
|
- Mayhem
|
||||||
|
|||||||
@ -919,7 +919,7 @@ Keybinds =
|
|||||||
|
|
||||||
open: (thread, tab) ->
|
open: (thread, tab) ->
|
||||||
id = thread.firstChild.id
|
id = thread.firstChild.id
|
||||||
url = "http://boards.4chan.org/#{g.BOARD}/res/#{id}"
|
url = "//boards.4chan.org/#{g.BOARD}/res/#{id}"
|
||||||
if tab
|
if tab
|
||||||
$.open url
|
$.open url
|
||||||
else
|
else
|
||||||
@ -1648,7 +1648,7 @@ qr =
|
|||||||
qr.cooldown.auto = qr.replies.length > 1
|
qr.cooldown.auto = qr.replies.length > 1
|
||||||
qr.cooldown.set if /sage/i.test reply.email then 60 else 30
|
qr.cooldown.set if /sage/i.test reply.email then 60 else 30
|
||||||
if conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto
|
if conf['Open Reply in New Tab'] && !g.REPLY && !qr.cooldown.auto
|
||||||
$.open "http://boards.4chan.org/#{g.BOARD}/res/#{thread}##{postNumber}"
|
$.open "//boards.4chan.org/#{g.BOARD}/res/#{thread}##{postNumber}"
|
||||||
|
|
||||||
if conf['Persistent QR'] or qr.cooldown.auto
|
if conf['Persistent QR'] or qr.cooldown.auto
|
||||||
reply.rm()
|
reply.rm()
|
||||||
@ -2389,7 +2389,7 @@ RevealSpoilers =
|
|||||||
return
|
return
|
||||||
img.removeAttribute 'height'
|
img.removeAttribute 'height'
|
||||||
img.removeAttribute 'width'
|
img.removeAttribute 'width'
|
||||||
img.src = "http://thumbs.4chan.org#{img.parentNode.pathname.replace(/src(\/\d+).+$/, 'thumb$1s.jpg')}"
|
img.src = "//thumbs.4chan.org#{img.parentNode.pathname.replace(/src(\/\d+).+$/, 'thumb$1s.jpg')}"
|
||||||
|
|
||||||
Time =
|
Time =
|
||||||
init: ->
|
init: ->
|
||||||
@ -2842,7 +2842,7 @@ ReportButton =
|
|||||||
$.after $('span[id]', post.el), [$.tn(' '), a]
|
$.after $('span[id]', post.el), [$.tn(' '), a]
|
||||||
$.on a, 'click', ReportButton.report
|
$.on a, 'click', ReportButton.report
|
||||||
report: ->
|
report: ->
|
||||||
url = "http://sys.4chan.org/#{g.BOARD}/imgboard.php?mode=report&no=#{$.x('preceding-sibling::input', @).name}"
|
url = "//sys.4chan.org/#{g.BOARD}/imgboard.php?mode=report&no=#{$.x('preceding-sibling::input', @).name}"
|
||||||
id = Date.now()
|
id = Date.now()
|
||||||
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200"
|
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200"
|
||||||
window.open url, id, set
|
window.open url, id, set
|
||||||
@ -2998,7 +2998,7 @@ Redirect =
|
|||||||
"http://archive.no-ip.org/#{board}/#{mode}/#{id}"
|
"http://archive.no-ip.org/#{board}/#{mode}/#{id}"
|
||||||
else
|
else
|
||||||
if mode is 'thread'
|
if mode is 'thread'
|
||||||
"http://boards.4chan.org/#{board}/"
|
"//boards.4chan.org/#{board}/"
|
||||||
else
|
else
|
||||||
null
|
null
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user