diff --git a/4chan_x.user.js b/4chan_x.user.js index 98d30831b..cb18a9300 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -6,11 +6,10 @@ // @copyright 2009-2011 James Campos // @copyright 2012 Nicolas Stepien // @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/* +// @include http*://boards.4chan.org/* +// @include http*://images.4chan.org/* +// @include http*://sys.4chan.org/* +// @include http*://www.4chan.org/* // @run-at document-start // @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js // @icon http://mayhemydg.github.com/4chan-x/favicon.gif @@ -1125,7 +1124,7 @@ open: function(thread, tab) { var id, url; id = thread.firstChild.id; - url = "http://boards.4chan.org/" + g.BOARD + "/res/" + id; + url = "//boards.4chan.org/" + g.BOARD + "/res/" + id; if (tab) { return $.open(url); } else { @@ -1971,7 +1970,7 @@ qr.cooldown.auto = qr.replies.length > 1; qr.cooldown.set(/sage/i.test(reply.email) ? 60 : 30); 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) { @@ -2832,7 +2831,7 @@ if (!(img && /^Spoil/.test(img.alt)) || post["class"] === 'inline') return; img.removeAttribute('height'); 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() { 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(); set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200"; return window.open(url, id, set); @@ -3597,7 +3596,7 @@ return "http://archive.no-ip.org/" + board + "/" + mode + "/" + id; default: if (mode === 'thread') { - return "http://boards.4chan.org/" + board + "/"; + return "//boards.4chan.org/" + board + "/"; } else { return null; } diff --git a/Cakefile b/Cakefile index 017a9ecdd..3fa6e3468 100644 --- a/Cakefile +++ b/Cakefile @@ -13,11 +13,10 @@ HEADER = """ // @copyright 2009-2011 James Campos // @copyright 2012 Nicolas Stepien // @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/* +// @include http*://boards.4chan.org/* +// @include http*://images.4chan.org/* +// @include http*://sys.4chan.org/* +// @include http*://www.4chan.org/* // @run-at document-start // @updateURL https://raw.github.com/MayhemYDG/4chan-x/stable/4chan_x.user.js // @icon http://mayhemydg.github.com/4chan-x/favicon.gif diff --git a/changelog b/changelog index ee7938940..06142db30 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Now works when using https. 2.29.1 - Mayhem diff --git a/script.coffee b/script.coffee index 4921c2f2c..5cb6453a4 100644 --- a/script.coffee +++ b/script.coffee @@ -919,7 +919,7 @@ Keybinds = open: (thread, tab) -> id = thread.firstChild.id - url = "http://boards.4chan.org/#{g.BOARD}/res/#{id}" + url = "//boards.4chan.org/#{g.BOARD}/res/#{id}" if tab $.open url else @@ -1648,7 +1648,7 @@ qr = qr.cooldown.auto = qr.replies.length > 1 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 - $.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 reply.rm() @@ -2389,7 +2389,7 @@ RevealSpoilers = return img.removeAttribute 'height' 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 = init: -> @@ -2842,7 +2842,7 @@ ReportButton = $.after $('span[id]', post.el), [$.tn(' '), a] $.on a, 'click', ReportButton.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() set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200" window.open url, id, set @@ -2998,7 +2998,7 @@ Redirect = "http://archive.no-ip.org/#{board}/#{mode}/#{id}" else if mode is 'thread' - "http://boards.4chan.org/#{board}/" + "//boards.4chan.org/#{board}/" else null