diff --git a/CHANGELOG.md b/CHANGELOG.md index 70da5ade8..44c6ba3d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## v1.12.0 +**v1.12.0.7** *(2016-07-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.crx)] +- Restore `Open Post in New Tab` option. + **v1.12.0.6** *(2016-06-28)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.6/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.6/builds/4chan-X-noupdate.crx)] - Merge v1.11.35.9: Update archive list, and update cuckchan.org -> desuarchive.org in sauce examples. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index c6034a7e2..e87e3c0cf 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 88b0c2494..a4be9d91a 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.12.0.6 +// @version 1.12.0.7 // @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 353ef5410..452f4b8d4 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.12.0.6 +// @version 1.12.0.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.6', + VERSION: '1.12.0.7', NAMESPACE: '4chan X.', boards: {} }; @@ -284,6 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], + 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -20134,7 +20135,7 @@ QR = (function() { return QR.status(); }, response: function() { - var _, ban, err, h1, isReply, lastPostToThread, m, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID, url; + var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID; req = QR.req; delete QR.req; post = QR.posts[0]; @@ -20221,17 +20222,22 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - url = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; - if (url) { + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + if (URL) { + open = Conf['Open Post in New Tab'] || postsCount ? function() { + return $.open(URL); + } : function() { + return window.location = URL; + }; if (threadID === postID) { - QR.waitForThread(url); + QR.waitForThread(URL, open); } else { - $.open(url); + open(); } } return QR.status(); }, - waitForThread: function(url) { + waitForThread: function(url, cb) { var attempts, check; attempts = 0; check = function() { @@ -20239,7 +20245,7 @@ QR = (function() { onloadend: function() { attempts++; if (attempts >= 6 || this.status === 200) { - return $.open(url); + return cb(); } else { return setTimeout(check, attempts * $.SECOND); } diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index a077cfccb..a18c3fc71 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 237ad4561..b6b990f4b 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.12.0.6 +// @version 1.12.0.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.6', + VERSION: '1.12.0.7', NAMESPACE: '4chan X.', boards: {} }; @@ -284,6 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], + 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -20134,7 +20135,7 @@ QR = (function() { return QR.status(); }, response: function() { - var _, ban, err, h1, isReply, lastPostToThread, m, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID, url; + var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID; req = QR.req; delete QR.req; post = QR.posts[0]; @@ -20221,17 +20222,22 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - url = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; - if (url) { + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + if (URL) { + open = Conf['Open Post in New Tab'] || postsCount ? function() { + return $.open(URL); + } : function() { + return window.location = URL; + }; if (threadID === postID) { - QR.waitForThread(url); + QR.waitForThread(URL, open); } else { - $.open(url); + open(); } } return QR.status(); }, - waitForThread: function(url) { + waitForThread: function(url, cb) { var attempts, check; attempts = 0; check = function() { @@ -20239,7 +20245,7 @@ QR = (function() { onloadend: function() { attempts++; if (attempts >= 6 || this.status === 200) { - return $.open(url); + return cb(); } else { return setTimeout(check, attempts * $.SECOND); } diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 160d71b97..6a5dcb517 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 904a9bc88..01c0a6c6d 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.12.0.6 +// @version 1.12.0.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 8b9793e86..66fc8e175 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.12.0.6 +// @version 1.12.0.7 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.6', + VERSION: '1.12.0.7', NAMESPACE: '4chan X.', boards: {} }; @@ -284,6 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], + 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -20134,7 +20135,7 @@ QR = (function() { return QR.status(); }, response: function() { - var _, ban, err, h1, isReply, lastPostToThread, m, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID, url; + var URL, _, ban, err, h1, isReply, lastPostToThread, m, open, post, postID, postsCount, ref, ref1, ref2, req, resDoc, seconds, threadID; req = QR.req; delete QR.req; post = QR.posts[0]; @@ -20221,17 +20222,22 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - url = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; - if (url) { + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + if (URL) { + open = Conf['Open Post in New Tab'] || postsCount ? function() { + return $.open(URL); + } : function() { + return window.location = URL; + }; if (threadID === postID) { - QR.waitForThread(url); + QR.waitForThread(URL, open); } else { - $.open(url); + open(); } } return QR.status(); }, - waitForThread: function(url) { + waitForThread: function(url, cb) { var attempts, check; attempts = 0; check = function() { @@ -20239,7 +20245,7 @@ QR = (function() { onloadend: function() { attempts++; if (attempts >= 6 || this.status === 200) { - return $.open(url); + return cb(); } else { return setTimeout(check, attempts * $.SECOND); } diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index c47dd3991..70d0ec878 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml index 43226a84c..e78aef761 100644 --- a/builds/updates-beta.xml +++ b/builds/updates-beta.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/updates.xml b/builds/updates.xml index cb36eef3a..062119d17 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index e285c6cf8..ad75e5ded 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.12.0.6", - "date": "2016-06-28T01:18:12.438Z" + "version": "1.12.0.7", + "date": "2016-07-06T08:35:01.248Z" } \ No newline at end of file