diff --git a/CHANGELOG.md b/CHANGELOG.md index 0124911bc..2b6e1ec53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ ### v1.14.4 +**v1.14.4.6** *(2018-11-25)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.4.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.4.6/builds/4chan-X-noupdate.crx)] +- Use now working sys.4channel.org for posting to worksafe boards; should fix some issues with posting. #2140 #2149 +- Fix catalog/search link rewriting. #2151 +- Make URLs in thread watcher point to appropriate domain. #2143 +- Make cross-domain quotes of you light up thread watcher. + **v1.14.4.5** *(2018-11-23)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.4.5/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.14.4.5/builds/4chan-X-noupdate.crx)] - Fix bug in previous version causing 4channel.org to be seen as separate site in thread watcher etc. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index fcbb11538..af878bf5b 100644 Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js index e7fe88914..42d2bcad8 100644 --- a/builds/4chan-X-beta.meta.js +++ b/builds/4chan-X-beta.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.14.4.5 +// @version 1.14.4.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js index 470df7f7a..a766daae2 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X beta -// @version 1.14.4.5 +// @version 1.14.4.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.4.5', + VERSION: '1.14.4.6', NAMESPACE: '4chan X.', boards: {} }; @@ -7272,7 +7272,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/res/" + threadID + ".html"; + return location.origin + "/" + boardID + "/res/" + threadID + ".html"; } }, selectors: { @@ -7380,7 +7380,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/thread/" + threadID; + return location.protocol + "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID; } }, selectors: { @@ -16681,8 +16681,8 @@ CatalogLinks = (function() { ref = $$('a', this.nodes.comment); for (i = 0, len = ref.length; i < len; i++) { a = ref[i]; - if (m = a.href.match(/^https?:\/\/boards\.4chan(?:nel)?\.org\/([^\/]+)\/catalog(#s=.*)?/)) { - a.href = "//boards.4chan(?:nel)?.org/" + m[1] + "/" + (m[2] || '#catalog'); + if (m = a.href.match(/^https?:\/\/(boards\.4chan(?:nel)?\.org\/[^\/]+)\/catalog(#s=.*)?/)) { + a.href = "//" + m[1] + "/" + (m[2] || '#catalog'); } } }, @@ -20080,7 +20080,7 @@ ThreadWatcher = (function() { continue; } quotesYou = false; - regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; + regexp = /]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; while (match = regexp.exec(postObj.com)) { if (QuoteYou.db.get({ boardID: match[1] || boardID, @@ -20158,10 +20158,10 @@ ThreadWatcher = (function() { excerpt = data.excerpt; excerpt || (excerpt = "/" + boardID + "/ - No." + threadID); link = $.el('a', { - href: "/" + (Site.urls.thread({ + href: Site.urls.thread({ boardID: boardID, threadID: threadID - })), + }), title: excerpt, className: 'watcher-link' }); @@ -22527,7 +22527,7 @@ QR = (function() { extra.form.append('g-recaptcha-response', response.response); } } - QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra); + QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options, extra); return QR.req.progress = '...'; }; if (typeof captcha === 'function') { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index e2dca78c3..7bb364802 100644 Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js index d27178815..a1859046b 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.4.5 +// @version 1.14.4.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.4.5', + VERSION: '1.14.4.6', NAMESPACE: '4chan X.', boards: {} }; @@ -7272,7 +7272,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/res/" + threadID + ".html"; + return location.origin + "/" + boardID + "/res/" + threadID + ".html"; } }, selectors: { @@ -7380,7 +7380,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/thread/" + threadID; + return location.protocol + "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID; } }, selectors: { @@ -16681,8 +16681,8 @@ CatalogLinks = (function() { ref = $$('a', this.nodes.comment); for (i = 0, len = ref.length; i < len; i++) { a = ref[i]; - if (m = a.href.match(/^https?:\/\/boards\.4chan(?:nel)?\.org\/([^\/]+)\/catalog(#s=.*)?/)) { - a.href = "//boards.4chan(?:nel)?.org/" + m[1] + "/" + (m[2] || '#catalog'); + if (m = a.href.match(/^https?:\/\/(boards\.4chan(?:nel)?\.org\/[^\/]+)\/catalog(#s=.*)?/)) { + a.href = "//" + m[1] + "/" + (m[2] || '#catalog'); } } }, @@ -20080,7 +20080,7 @@ ThreadWatcher = (function() { continue; } quotesYou = false; - regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; + regexp = /]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; while (match = regexp.exec(postObj.com)) { if (QuoteYou.db.get({ boardID: match[1] || boardID, @@ -20158,10 +20158,10 @@ ThreadWatcher = (function() { excerpt = data.excerpt; excerpt || (excerpt = "/" + boardID + "/ - No." + threadID); link = $.el('a', { - href: "/" + (Site.urls.thread({ + href: Site.urls.thread({ boardID: boardID, threadID: threadID - })), + }), title: excerpt, className: 'watcher-link' }); @@ -22527,7 +22527,7 @@ QR = (function() { extra.form.append('g-recaptcha-response', response.response); } } - QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra); + QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options, extra); return QR.req.progress = '...'; }; if (typeof captcha === 'function') { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 2e0f4375d..56b8b1d7a 100644 Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 6c93a2dbe..fc99e9658 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.4.5 +// @version 1.14.4.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 79538f72a..a6d44de3b 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.14.4.5 +// @version 1.14.4.6 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -198,7 +198,7 @@ docSet = function() { }; g = { - VERSION: '1.14.4.5', + VERSION: '1.14.4.6', NAMESPACE: '4chan X.', boards: {} }; @@ -7272,7 +7272,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/res/" + threadID + ".html"; + return location.origin + "/" + boardID + "/res/" + threadID + ".html"; } }, selectors: { @@ -7380,7 +7380,7 @@ SW = {}; thread: function(arg) { var boardID, threadID; boardID = arg.boardID, threadID = arg.threadID; - return boardID + "/thread/" + threadID; + return location.protocol + "//" + (BoardConfig.domain(boardID)) + "/" + boardID + "/thread/" + threadID; } }, selectors: { @@ -16681,8 +16681,8 @@ CatalogLinks = (function() { ref = $$('a', this.nodes.comment); for (i = 0, len = ref.length; i < len; i++) { a = ref[i]; - if (m = a.href.match(/^https?:\/\/boards\.4chan(?:nel)?\.org\/([^\/]+)\/catalog(#s=.*)?/)) { - a.href = "//boards.4chan(?:nel)?.org/" + m[1] + "/" + (m[2] || '#catalog'); + if (m = a.href.match(/^https?:\/\/(boards\.4chan(?:nel)?\.org\/[^\/]+)\/catalog(#s=.*)?/)) { + a.href = "//" + m[1] + "/" + (m[2] || '#catalog'); } } }, @@ -20080,7 +20080,7 @@ ThreadWatcher = (function() { continue; } quotesYou = false; - regexp = /]*\bhref="(?:\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; + regexp = /]*\bhref="(?:(?:\/\/boards\.4chan(?:nel)?\.org)?\/([^\/]+)\/thread\/)?(\d+)?(?:#p(\d+))?"/g; while (match = regexp.exec(postObj.com)) { if (QuoteYou.db.get({ boardID: match[1] || boardID, @@ -20158,10 +20158,10 @@ ThreadWatcher = (function() { excerpt = data.excerpt; excerpt || (excerpt = "/" + boardID + "/ - No." + threadID); link = $.el('a', { - href: "/" + (Site.urls.thread({ + href: Site.urls.thread({ boardID: boardID, threadID: threadID - })), + }), title: excerpt, className: 'watcher-link' }); @@ -22527,7 +22527,7 @@ QR = (function() { extra.form.append('g-recaptcha-response', response.response); } } - QR.req = $.ajax("https://sys.4chan.org/" + g.BOARD + "/post", options, extra); + QR.req = $.ajax("https://sys." + (location.hostname.split('.')[1]) + ".org/" + g.BOARD + "/post", options, extra); return QR.req.progress = '...'; }; if (typeof captcha === 'function') { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 5f0553d46..25784a439 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.json b/builds/updates-beta.json index f3101950b..123ee86d8 100644 --- a/builds/updates-beta.json +++ b/builds/updates-beta.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.4.5", + "version": "1.14.4.6", "update_link": "https://www.4chan-x.net/builds/4chan-X-beta.crx" } ] diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index 5dc2737f4..da805e3e0 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.json b/builds/updates.json index a805270e8..5c7981430 100644 --- a/builds/updates.json +++ b/builds/updates.json @@ -3,7 +3,7 @@ "4chan-x@4chan-x.net": { "updates": [ { - "version": "1.14.4.5", + "version": "1.14.4.6", "update_link": "https://www.4chan-x.net/builds/4chan-X.crx" } ] diff --git a/builds/updates.xml b/builds/updates.xml index bcce9ebb1..fd2941e64 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 24c52b4fb..53d789f45 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.14.4.5", - "date": "2018-11-23T22:52:15.116Z" + "version": "1.14.4.6", + "date": "2018-11-25T07:58:42.512Z" } \ No newline at end of file