diff --git a/CHANGELOG.md b/CHANGELOG.md index a78b546ed..b6e53f6bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.31 +**v1.11.31.1** *(2016-04-23)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.31.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.31.1/builds/4chan-X-noupdate.crx "Chromium version")] +- Fix regression from v1.11.31.0 causing "Post successful" notifications not to appear. +- Fix fullscreen for Vimeo embeds. +- Update Twitch embedding. + **v1.11.31.0** *(2016-04-21)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.31.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.31.0/builds/4chan-X-noupdate.crx "Chromium version")] - Based on v1.11.30.3. - Fix scrolling issue that happened when `Reply Pruning` removes posts from above you in a thread. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index de54a68a6..024888e64 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 852af908b..6f7be2f7b 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.11.31.0 +// @version 1.11.31.1 // @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 ddc829c9d..8a7e51804 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.11.31.0 +// @version 1.11.31.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -129,7 +129,7 @@ d = document; doc = d.documentElement; g = { - VERSION: '1.11.31.0', + VERSION: '1.11.31.1', NAMESPACE: '4chan X.', boards: {} }; @@ -12872,7 +12872,7 @@ Embedding = (function() { } $.on(embed, 'click', Embedding.cb.toggle); $.after(link, [$.tn(' '), embed]); - if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote && key !== 'TwitchTV') { + if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote) { return $.asap((function() { return doc.contains(embed); }), function() { @@ -13177,39 +13177,19 @@ Embedding = (function() { } }, { key: 'TwitchTV', - regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/, - style: "border: none; width: 620px; height: 378px;", + regExp: /^\w+:\/\/(?:www\.|secure\.)?twitch\.tv\/(\w[^#\&\?]*)/, el: function(a) { - var _, channel, flashvars, id, idprefix, j, len, obj, part, ref, result, seconds, start, type; - if (result = /(\w+)\/([bcv])\/(\d+)/i.exec(a.dataset.uid)) { - _ = result[0], channel = result[1], type = result[2], id = result[3]; - idprefix = type === 'b' ? 'a' : type; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false&videoId=" + idprefix + id; - if (start = a.dataset.href.match(/\bt=(\w+)/)) { - seconds = 0; - ref = start[1].match(/\d+[hms]/g); - for (j = 0, len = ref.length; j < len; j++) { - part = ref[j]; - seconds += +part.slice(0, -1) * { - 'h': 3600, - 'm': 60, - 's': 1 - }[part.slice(-1)]; - } - flashvars += "&initial_time=" + seconds; - } - } else { - channel = (/(\w+)/.exec(a.dataset.uid))[0]; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false"; + var el, m, time, url; + m = a.dataset.uid.match(/(\w+)(?:\/v\/(\d+))?/); + url = "//player.twitch.tv/?" + (m[2] ? "video=v" + m[2] : "channel=" + m[1]) + "&autoplay=false"; + if ((time = a.dataset.href.match(/\bt=(\w+)/))) { + url += "&time=" + time[1]; } - obj = $.el('object', { - data: '//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' + el = $.el('iframe', { + src: url }); - $.extend(obj, { - innerHTML: "" - }); - obj.children[1].value = flashvars; - return obj; + el.setAttribute("allowfullscreen", "true"); + return el; } }, { key: 'Vocaroo', @@ -13229,9 +13209,12 @@ Embedding = (function() { key: 'Vimeo', regExp: /^\w+:\/\/(?:www\.)?vimeo\.com\/(\d+)/, el: function(a) { - return $.el('iframe', { + var el; + el = $.el('iframe', { src: "//player.vimeo.com/video/" + a.dataset.uid + "?wmode=opaque" }); + el.setAttribute("allowfullscreen", "true"); + return el; }, title: { api: function(uid) { @@ -20077,10 +20060,6 @@ QR = (function() { return; } h1 = $('h1', resDoc); - QR.cleanNotifications(); - if (Conf['Posting Success Notifications']) { - QR.notifications.push(new Notice('success', h1.textContent, 5)); - } ref2 = h1.nextSibling.textContent.match(/thread:(\d+),no:(\d+)/), _ = ref2[0], threadID = ref2[1], postID = ref2[2]; postID = +postID; threadID = +threadID || postID; @@ -20113,6 +20092,10 @@ QR = (function() { post.rm(); QR.captcha.setup(d.activeElement === QR.nodes.status); } + QR.cleanNotifications(); + if (Conf['Posting Success Notifications']) { + QR.notifications.push(new Notice('success', h1.textContent, 5)); + } QR.cooldown.add(threadID, postID); 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) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 2eebf6d96..a58ca607a 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 ae3d5477b..9f2c3c710 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.11.31.0 +// @version 1.11.31.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -129,7 +129,7 @@ d = document; doc = d.documentElement; g = { - VERSION: '1.11.31.0', + VERSION: '1.11.31.1', NAMESPACE: '4chan X.', boards: {} }; @@ -12872,7 +12872,7 @@ Embedding = (function() { } $.on(embed, 'click', Embedding.cb.toggle); $.after(link, [$.tn(' '), embed]); - if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote && key !== 'TwitchTV') { + if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote) { return $.asap((function() { return doc.contains(embed); }), function() { @@ -13177,39 +13177,19 @@ Embedding = (function() { } }, { key: 'TwitchTV', - regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/, - style: "border: none; width: 620px; height: 378px;", + regExp: /^\w+:\/\/(?:www\.|secure\.)?twitch\.tv\/(\w[^#\&\?]*)/, el: function(a) { - var _, channel, flashvars, id, idprefix, j, len, obj, part, ref, result, seconds, start, type; - if (result = /(\w+)\/([bcv])\/(\d+)/i.exec(a.dataset.uid)) { - _ = result[0], channel = result[1], type = result[2], id = result[3]; - idprefix = type === 'b' ? 'a' : type; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false&videoId=" + idprefix + id; - if (start = a.dataset.href.match(/\bt=(\w+)/)) { - seconds = 0; - ref = start[1].match(/\d+[hms]/g); - for (j = 0, len = ref.length; j < len; j++) { - part = ref[j]; - seconds += +part.slice(0, -1) * { - 'h': 3600, - 'm': 60, - 's': 1 - }[part.slice(-1)]; - } - flashvars += "&initial_time=" + seconds; - } - } else { - channel = (/(\w+)/.exec(a.dataset.uid))[0]; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false"; + var el, m, time, url; + m = a.dataset.uid.match(/(\w+)(?:\/v\/(\d+))?/); + url = "//player.twitch.tv/?" + (m[2] ? "video=v" + m[2] : "channel=" + m[1]) + "&autoplay=false"; + if ((time = a.dataset.href.match(/\bt=(\w+)/))) { + url += "&time=" + time[1]; } - obj = $.el('object', { - data: '//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' + el = $.el('iframe', { + src: url }); - $.extend(obj, { - innerHTML: "" - }); - obj.children[1].value = flashvars; - return obj; + el.setAttribute("allowfullscreen", "true"); + return el; } }, { key: 'Vocaroo', @@ -13229,9 +13209,12 @@ Embedding = (function() { key: 'Vimeo', regExp: /^\w+:\/\/(?:www\.)?vimeo\.com\/(\d+)/, el: function(a) { - return $.el('iframe', { + var el; + el = $.el('iframe', { src: "//player.vimeo.com/video/" + a.dataset.uid + "?wmode=opaque" }); + el.setAttribute("allowfullscreen", "true"); + return el; }, title: { api: function(uid) { @@ -20077,10 +20060,6 @@ QR = (function() { return; } h1 = $('h1', resDoc); - QR.cleanNotifications(); - if (Conf['Posting Success Notifications']) { - QR.notifications.push(new Notice('success', h1.textContent, 5)); - } ref2 = h1.nextSibling.textContent.match(/thread:(\d+),no:(\d+)/), _ = ref2[0], threadID = ref2[1], postID = ref2[2]; postID = +postID; threadID = +threadID || postID; @@ -20113,6 +20092,10 @@ QR = (function() { post.rm(); QR.captcha.setup(d.activeElement === QR.nodes.status); } + QR.cleanNotifications(); + if (Conf['Posting Success Notifications']) { + QR.notifications.push(new Notice('success', h1.textContent, 5)); + } QR.cooldown.add(threadID, postID); 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) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 8e7b1865d..681e4196d 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 d2724fc43..20aa48f07 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.31.0 +// @version 1.11.31.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index ec07ab623..ab0cf45f3 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.31.0 +// @version 1.11.31.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -129,7 +129,7 @@ d = document; doc = d.documentElement; g = { - VERSION: '1.11.31.0', + VERSION: '1.11.31.1', NAMESPACE: '4chan X.', boards: {} }; @@ -12872,7 +12872,7 @@ Embedding = (function() { } $.on(embed, 'click', Embedding.cb.toggle); $.after(link, [$.tn(' '), embed]); - if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote && key !== 'TwitchTV') { + if (Conf['Auto-embed'] && !Conf['Floating Embeds'] && !post.isFetchedQuote) { return $.asap((function() { return doc.contains(embed); }), function() { @@ -13177,39 +13177,19 @@ Embedding = (function() { } }, { key: 'TwitchTV', - regExp: /^\w+:\/\/(?:www\.)?twitch\.tv\/(\w[^#\&\?]*)/, - style: "border: none; width: 620px; height: 378px;", + regExp: /^\w+:\/\/(?:www\.|secure\.)?twitch\.tv\/(\w[^#\&\?]*)/, el: function(a) { - var _, channel, flashvars, id, idprefix, j, len, obj, part, ref, result, seconds, start, type; - if (result = /(\w+)\/([bcv])\/(\d+)/i.exec(a.dataset.uid)) { - _ = result[0], channel = result[1], type = result[2], id = result[3]; - idprefix = type === 'b' ? 'a' : type; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false&videoId=" + idprefix + id; - if (start = a.dataset.href.match(/\bt=(\w+)/)) { - seconds = 0; - ref = start[1].match(/\d+[hms]/g); - for (j = 0, len = ref.length; j < len; j++) { - part = ref[j]; - seconds += +part.slice(0, -1) * { - 'h': 3600, - 'm': 60, - 's': 1 - }[part.slice(-1)]; - } - flashvars += "&initial_time=" + seconds; - } - } else { - channel = (/(\w+)/.exec(a.dataset.uid))[0]; - flashvars = "channel=" + channel + "&start_volume=25&auto_play=false"; + var el, m, time, url; + m = a.dataset.uid.match(/(\w+)(?:\/v\/(\d+))?/); + url = "//player.twitch.tv/?" + (m[2] ? "video=v" + m[2] : "channel=" + m[1]) + "&autoplay=false"; + if ((time = a.dataset.href.match(/\bt=(\w+)/))) { + url += "&time=" + time[1]; } - obj = $.el('object', { - data: '//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf' + el = $.el('iframe', { + src: url }); - $.extend(obj, { - innerHTML: "" - }); - obj.children[1].value = flashvars; - return obj; + el.setAttribute("allowfullscreen", "true"); + return el; } }, { key: 'Vocaroo', @@ -13229,9 +13209,12 @@ Embedding = (function() { key: 'Vimeo', regExp: /^\w+:\/\/(?:www\.)?vimeo\.com\/(\d+)/, el: function(a) { - return $.el('iframe', { + var el; + el = $.el('iframe', { src: "//player.vimeo.com/video/" + a.dataset.uid + "?wmode=opaque" }); + el.setAttribute("allowfullscreen", "true"); + return el; }, title: { api: function(uid) { @@ -20077,10 +20060,6 @@ QR = (function() { return; } h1 = $('h1', resDoc); - QR.cleanNotifications(); - if (Conf['Posting Success Notifications']) { - QR.notifications.push(new Notice('success', h1.textContent, 5)); - } ref2 = h1.nextSibling.textContent.match(/thread:(\d+),no:(\d+)/), _ = ref2[0], threadID = ref2[1], postID = ref2[2]; postID = +postID; threadID = +threadID || postID; @@ -20113,6 +20092,10 @@ QR = (function() { post.rm(); QR.captcha.setup(d.activeElement === QR.nodes.status); } + QR.cleanNotifications(); + if (Conf['Posting Success Notifications']) { + QR.notifications.push(new Notice('success', h1.textContent, 5)); + } QR.cooldown.add(threadID, postID); 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) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 6e47d2b47..ccf4436b4 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 c58daf9bf..d066258b7 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 2c1fff346..dfb8e43c4 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index a6887bb95..01284af3c 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.31.0", - "date": "2016-04-21T07:02:56.784Z" + "version": "1.11.31.1", + "date": "2016-04-23T08:49:07.223Z" } \ No newline at end of file