diff --git a/CHANGELOG.md b/CHANGELOG.md index f649ba5b0..6a3d71f96 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ The links to individual versions below are to copies of the script with the upda ### v1.10.4 +**v1.10.4.4** *(2015-03-13)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.4.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.4.4/builds/4chan-X-noupdate.crx "Chromium version")] +- Update Strawpoll, Loopvid embedding; remove MediaCrush. +- API bug fix. + **v1.10.4.3** *(2015-03-10)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.4.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.4.3/builds/4chan-X-noupdate.crx "Chromium version")] - Fix false-positive deleted posts again. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index 4d24d829b..512a6a3f0 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 f4d69c1a4..099d60f01 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.10.4.3 +// @version 1.10.4.4 // @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 fe98e6ac5..5e30ccaac 100644 --- a/builds/4chan-X-beta.user.js +++ b/builds/4chan-X-beta.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X beta -// @version 1.10.4.3 +// @version 1.10.4.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -395,7 +395,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.4.3', + VERSION: '1.10.4.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -11005,75 +11005,6 @@ el.setAttribute("allowfullscreen", "true"); return el; } - }, { - key: 'MediaCrush', - regExp: /^\w+:\/\/(?:www\.)?mediacru\.sh\/([\w\-]+)/, - style: '', - el: function(a) { - var el; - el = $.el('div'); - $.queueTask(function() { - return $.cache("https://mediacru.sh/" + a.dataset.uid + ".json", function() { - var embed, ext, file, files, i, k, len1, len2, len3, q, ref, ref1, status, type, u; - if (!doc.contains(el)) { - return; - } - status = this.status; - if (status !== 200 && status !== 304) { - return el.textContent = "ERROR " + status; - } - files = this.response.files; - ref = ['video/mp4', 'video/webm', 'video/ogv', 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg', 'audio/mpeg', 'audio/ogg']; - for (k = 0, len1 = ref.length; k < len1; k++) { - type = ref[k]; - for (q = 0, len2 = files.length; q < len2; q++) { - file = files[q]; - if (file.type === type) { - embed = file; - break; - } - } - if (embed) { - break; - } - } - if (!embed) { - return el.textContent = "ERROR: Not a valid filetype"; - } - switch (embed.type) { - case 'video/mp4': - case 'video/webm': - case 'video/ogv': - $.extend(el, { - innerHTML: "" - }); - ref1 = ['mp4', 'webm']; - for (i = u = 0, len3 = ref1.length; u < len3; i = ++u) { - ext = ref1[i]; - el.firstChild.children[i].src = "https://mediacru.sh/" + a.dataset.uid + "." + ext; - } - break; - case 'image/svg+xml': - case 'image/png': - case 'image/gif': - case 'image/jpeg': - $.extend(el, { - innerHTML: "" - }); - break; - case 'audio/mpeg': - case 'audio/ogg': - $.extend(el, { - innerHTML: "" - }); - break; - default: - el.textContent = "ERROR: No valid filetype."; - } - }); - }); - return el; - } }, { key: 'Pastebin', regExp: /^\w+:\/\/(?:\w+\.)?pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+)/, @@ -11113,11 +11044,10 @@ }, { key: 'StrawPoll', regExp: /^\w+:\/\/(?:www\.)?strawpoll\.me\/(?:embed_\d+\/)?(\d+(?:\/r)?)/, - httpOnly: true, style: 'border: 0; width: 600px; height: 406px;', el: function(a) { return $.el('iframe', { - src: "http://strawpoll.me/embed_1/" + a.dataset.uid + src: "//strawpoll.me/embed_1/" + a.dataset.uid }); } }, { @@ -11230,7 +11160,7 @@ } }, { key: 'Loopvid', - regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/((?:pf|kd|lv|mc|gd|gh|db|nn)\/[\w\-]+(,[\w\-]+)*|fc\/\w+\/\d+)/, + regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/#?((?:pf|kd|lv|gd|gh|db|dx|nn|cp|wu|ig|ky|gc)\/[\w\-\/]+(,[\w\-\/]+)*|fc\/\w+\/\d+)/, style: 'max-width: 80vw; max-height: 80vh;', el: function(a) { var _, base, el, host, k, len1, len2, name, names, q, ref, ref1, type, types, url; @@ -11240,7 +11170,18 @@ loop: true }); ref = a.dataset.uid.match(/(\w+)\/(.*)/), _ = ref[0], host = ref[1], names = ref[2]; - types = host === 'gd' || host === 'fc' ? [''] : ['.webm', '.mp4']; + types = (function() { + switch (host) { + case 'gd': + case 'wu': + case 'fc': + return ['']; + case 'gc': + return ['giant', 'fat', 'zippy']; + default: + return ['.webm', '.mp4']; + } + })(); ref1 = names.split(','); for (k = 0, len1 = ref1.length; k < len1; k++) { name = ref1[k]; @@ -11250,23 +11191,33 @@ url = (function() { switch (host) { case 'pf': - return "http://a.pomf.se/" + base; + return "https://a.pomf.se/" + base; case 'kd': - return "http://kastden.org/loopvid/" + base; + return "http://2.kastden.org/loopvid/" + base; case 'lv': return "http://loopvid.mooo.com/videos/" + base; - case 'mc': - return "https://cdn.mediacru.sh/" + base; case 'gd': return "https://docs.google.com/uc?export=download&id=" + base; case 'gh': return "https://googledrive.com/host/" + base; case 'db': - return "https://googledrive.com/host/" + base; - case 'fc': - return "//i.4cdn.org/" + base + ".webm"; + return "https://dl.dropboxusercontent.com/u/" + base; + case 'dx': + return "https://dl.dropboxusercontent.com/" + base; case 'nn': return "http://naenara.eu/loopvids/" + base; + case 'cp': + return "https://copy.com/" + base; + case 'wu': + return "http://webmup.com/" + base + "/vid.webm"; + case 'ig': + return "https://i.imgur.com/" + base; + case 'ky': + return "https://kiyo.me/" + base; + case 'fc': + return "//i.4cdn.org/" + base + ".webm"; + case 'gc': + return "https://" + type + ".gfycat.com/" + name + ".webm"; } })(); $.add(el, $.el('source', { @@ -11814,16 +11765,17 @@ }, node: function() { MarkNewIPs.ipCount = this.ipCount; + MarkNewIPs.postCount = this.posts.keys.length; return $.on(d, 'ThreadUpdate', MarkNewIPs.onUpdate); }, onUpdate: function(e) { - var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, q, ref; - ref = e.detail, ipCount = ref.ipCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; + var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, postCount, q, ref; + ref = e.detail, ipCount = ref.ipCount, postCount = ref.postCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; if (ipCount == null) { return; } switch (ipCount - MarkNewIPs.ipCount) { - case newPosts.length: + case postCount - MarkNewIPs.postCount + deletedPosts.length: i = MarkNewIPs.ipCount; for (k = 0, len1 = newPosts.length; k < len1; k++) { fullID = newPosts[k]; @@ -11836,7 +11788,8 @@ MarkNewIPs.markOld(g.posts[fullID]); } } - return MarkNewIPs.ipCount = ipCount; + MarkNewIPs.ipCount = ipCount; + return MarkNewIPs.postCount = postCount; }, markNew: function(post, ipCount) { var counter, suffix; @@ -12349,11 +12302,11 @@ if (ID <= lastPost) { continue; } - newPosts.push(board + "." + ID); if ((post = thread.posts[ID]) && !post.isFetchedQuote) { post.resurrect(); continue; } + newPosts.push(board + "." + ID); node = Build.postFromObject(postObject, board.ID); posts.push(new Post(node, thread, board)); if (ThreadUpdater.postID === ID) { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 1726380a3..b38738934 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 0cab7c29f..f33aacf54 100644 --- a/builds/4chan-X-noupdate.user.js +++ b/builds/4chan-X-noupdate.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.4.3 +// @version 1.10.4.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -394,7 +394,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.4.3', + VERSION: '1.10.4.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -11004,75 +11004,6 @@ el.setAttribute("allowfullscreen", "true"); return el; } - }, { - key: 'MediaCrush', - regExp: /^\w+:\/\/(?:www\.)?mediacru\.sh\/([\w\-]+)/, - style: '', - el: function(a) { - var el; - el = $.el('div'); - $.queueTask(function() { - return $.cache("https://mediacru.sh/" + a.dataset.uid + ".json", function() { - var embed, ext, file, files, i, k, len1, len2, len3, q, ref, ref1, status, type, u; - if (!doc.contains(el)) { - return; - } - status = this.status; - if (status !== 200 && status !== 304) { - return el.textContent = "ERROR " + status; - } - files = this.response.files; - ref = ['video/mp4', 'video/webm', 'video/ogv', 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg', 'audio/mpeg', 'audio/ogg']; - for (k = 0, len1 = ref.length; k < len1; k++) { - type = ref[k]; - for (q = 0, len2 = files.length; q < len2; q++) { - file = files[q]; - if (file.type === type) { - embed = file; - break; - } - } - if (embed) { - break; - } - } - if (!embed) { - return el.textContent = "ERROR: Not a valid filetype"; - } - switch (embed.type) { - case 'video/mp4': - case 'video/webm': - case 'video/ogv': - $.extend(el, { - innerHTML: "" - }); - ref1 = ['mp4', 'webm']; - for (i = u = 0, len3 = ref1.length; u < len3; i = ++u) { - ext = ref1[i]; - el.firstChild.children[i].src = "https://mediacru.sh/" + a.dataset.uid + "." + ext; - } - break; - case 'image/svg+xml': - case 'image/png': - case 'image/gif': - case 'image/jpeg': - $.extend(el, { - innerHTML: "" - }); - break; - case 'audio/mpeg': - case 'audio/ogg': - $.extend(el, { - innerHTML: "" - }); - break; - default: - el.textContent = "ERROR: No valid filetype."; - } - }); - }); - return el; - } }, { key: 'Pastebin', regExp: /^\w+:\/\/(?:\w+\.)?pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+)/, @@ -11112,11 +11043,10 @@ }, { key: 'StrawPoll', regExp: /^\w+:\/\/(?:www\.)?strawpoll\.me\/(?:embed_\d+\/)?(\d+(?:\/r)?)/, - httpOnly: true, style: 'border: 0; width: 600px; height: 406px;', el: function(a) { return $.el('iframe', { - src: "http://strawpoll.me/embed_1/" + a.dataset.uid + src: "//strawpoll.me/embed_1/" + a.dataset.uid }); } }, { @@ -11229,7 +11159,7 @@ } }, { key: 'Loopvid', - regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/((?:pf|kd|lv|mc|gd|gh|db|nn)\/[\w\-]+(,[\w\-]+)*|fc\/\w+\/\d+)/, + regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/#?((?:pf|kd|lv|gd|gh|db|dx|nn|cp|wu|ig|ky|gc)\/[\w\-\/]+(,[\w\-\/]+)*|fc\/\w+\/\d+)/, style: 'max-width: 80vw; max-height: 80vh;', el: function(a) { var _, base, el, host, k, len1, len2, name, names, q, ref, ref1, type, types, url; @@ -11239,7 +11169,18 @@ loop: true }); ref = a.dataset.uid.match(/(\w+)\/(.*)/), _ = ref[0], host = ref[1], names = ref[2]; - types = host === 'gd' || host === 'fc' ? [''] : ['.webm', '.mp4']; + types = (function() { + switch (host) { + case 'gd': + case 'wu': + case 'fc': + return ['']; + case 'gc': + return ['giant', 'fat', 'zippy']; + default: + return ['.webm', '.mp4']; + } + })(); ref1 = names.split(','); for (k = 0, len1 = ref1.length; k < len1; k++) { name = ref1[k]; @@ -11249,23 +11190,33 @@ url = (function() { switch (host) { case 'pf': - return "http://a.pomf.se/" + base; + return "https://a.pomf.se/" + base; case 'kd': - return "http://kastden.org/loopvid/" + base; + return "http://2.kastden.org/loopvid/" + base; case 'lv': return "http://loopvid.mooo.com/videos/" + base; - case 'mc': - return "https://cdn.mediacru.sh/" + base; case 'gd': return "https://docs.google.com/uc?export=download&id=" + base; case 'gh': return "https://googledrive.com/host/" + base; case 'db': - return "https://googledrive.com/host/" + base; - case 'fc': - return "//i.4cdn.org/" + base + ".webm"; + return "https://dl.dropboxusercontent.com/u/" + base; + case 'dx': + return "https://dl.dropboxusercontent.com/" + base; case 'nn': return "http://naenara.eu/loopvids/" + base; + case 'cp': + return "https://copy.com/" + base; + case 'wu': + return "http://webmup.com/" + base + "/vid.webm"; + case 'ig': + return "https://i.imgur.com/" + base; + case 'ky': + return "https://kiyo.me/" + base; + case 'fc': + return "//i.4cdn.org/" + base + ".webm"; + case 'gc': + return "https://" + type + ".gfycat.com/" + name + ".webm"; } })(); $.add(el, $.el('source', { @@ -11813,16 +11764,17 @@ }, node: function() { MarkNewIPs.ipCount = this.ipCount; + MarkNewIPs.postCount = this.posts.keys.length; return $.on(d, 'ThreadUpdate', MarkNewIPs.onUpdate); }, onUpdate: function(e) { - var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, q, ref; - ref = e.detail, ipCount = ref.ipCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; + var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, postCount, q, ref; + ref = e.detail, ipCount = ref.ipCount, postCount = ref.postCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; if (ipCount == null) { return; } switch (ipCount - MarkNewIPs.ipCount) { - case newPosts.length: + case postCount - MarkNewIPs.postCount + deletedPosts.length: i = MarkNewIPs.ipCount; for (k = 0, len1 = newPosts.length; k < len1; k++) { fullID = newPosts[k]; @@ -11835,7 +11787,8 @@ MarkNewIPs.markOld(g.posts[fullID]); } } - return MarkNewIPs.ipCount = ipCount; + MarkNewIPs.ipCount = ipCount; + return MarkNewIPs.postCount = postCount; }, markNew: function(post, ipCount) { var counter, suffix; @@ -12348,11 +12301,11 @@ if (ID <= lastPost) { continue; } - newPosts.push(board + "." + ID); if ((post = thread.posts[ID]) && !post.isFetchedQuote) { post.resurrect(); continue; } + newPosts.push(board + "." + ID); node = Build.postFromObject(postObject, board.ID); posts.push(new Post(node, thread, board)); if (ThreadUpdater.postID === ID) { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 322597915..72146b8d0 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 ada454a7a..51580a0eb 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.10.4.3 +// @version 1.10.4.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 950bb52f4..4027123e9 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.10.4.3 +// @version 1.10.4.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -395,7 +395,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.4.3', + VERSION: '1.10.4.4', NAMESPACE: '4chan X.', NAME: '4chan X', FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions', @@ -11005,75 +11005,6 @@ el.setAttribute("allowfullscreen", "true"); return el; } - }, { - key: 'MediaCrush', - regExp: /^\w+:\/\/(?:www\.)?mediacru\.sh\/([\w\-]+)/, - style: '', - el: function(a) { - var el; - el = $.el('div'); - $.queueTask(function() { - return $.cache("https://mediacru.sh/" + a.dataset.uid + ".json", function() { - var embed, ext, file, files, i, k, len1, len2, len3, q, ref, ref1, status, type, u; - if (!doc.contains(el)) { - return; - } - status = this.status; - if (status !== 200 && status !== 304) { - return el.textContent = "ERROR " + status; - } - files = this.response.files; - ref = ['video/mp4', 'video/webm', 'video/ogv', 'image/svg+xml', 'image/png', 'image/gif', 'image/jpeg', 'audio/mpeg', 'audio/ogg']; - for (k = 0, len1 = ref.length; k < len1; k++) { - type = ref[k]; - for (q = 0, len2 = files.length; q < len2; q++) { - file = files[q]; - if (file.type === type) { - embed = file; - break; - } - } - if (embed) { - break; - } - } - if (!embed) { - return el.textContent = "ERROR: Not a valid filetype"; - } - switch (embed.type) { - case 'video/mp4': - case 'video/webm': - case 'video/ogv': - $.extend(el, { - innerHTML: "" - }); - ref1 = ['mp4', 'webm']; - for (i = u = 0, len3 = ref1.length; u < len3; i = ++u) { - ext = ref1[i]; - el.firstChild.children[i].src = "https://mediacru.sh/" + a.dataset.uid + "." + ext; - } - break; - case 'image/svg+xml': - case 'image/png': - case 'image/gif': - case 'image/jpeg': - $.extend(el, { - innerHTML: "" - }); - break; - case 'audio/mpeg': - case 'audio/ogg': - $.extend(el, { - innerHTML: "" - }); - break; - default: - el.textContent = "ERROR: No valid filetype."; - } - }); - }); - return el; - } }, { key: 'Pastebin', regExp: /^\w+:\/\/(?:\w+\.)?pastebin\.com\/(?!u\/)(?:[\w\.]+\?i\=)?(\w+)/, @@ -11113,11 +11044,10 @@ }, { key: 'StrawPoll', regExp: /^\w+:\/\/(?:www\.)?strawpoll\.me\/(?:embed_\d+\/)?(\d+(?:\/r)?)/, - httpOnly: true, style: 'border: 0; width: 600px; height: 406px;', el: function(a) { return $.el('iframe', { - src: "http://strawpoll.me/embed_1/" + a.dataset.uid + src: "//strawpoll.me/embed_1/" + a.dataset.uid }); } }, { @@ -11230,7 +11160,7 @@ } }, { key: 'Loopvid', - regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/((?:pf|kd|lv|mc|gd|gh|db|nn)\/[\w\-]+(,[\w\-]+)*|fc\/\w+\/\d+)/, + regExp: /^\w+:\/\/(?:www\.)?loopvid.appspot.com\/#?((?:pf|kd|lv|gd|gh|db|dx|nn|cp|wu|ig|ky|gc)\/[\w\-\/]+(,[\w\-\/]+)*|fc\/\w+\/\d+)/, style: 'max-width: 80vw; max-height: 80vh;', el: function(a) { var _, base, el, host, k, len1, len2, name, names, q, ref, ref1, type, types, url; @@ -11240,7 +11170,18 @@ loop: true }); ref = a.dataset.uid.match(/(\w+)\/(.*)/), _ = ref[0], host = ref[1], names = ref[2]; - types = host === 'gd' || host === 'fc' ? [''] : ['.webm', '.mp4']; + types = (function() { + switch (host) { + case 'gd': + case 'wu': + case 'fc': + return ['']; + case 'gc': + return ['giant', 'fat', 'zippy']; + default: + return ['.webm', '.mp4']; + } + })(); ref1 = names.split(','); for (k = 0, len1 = ref1.length; k < len1; k++) { name = ref1[k]; @@ -11250,23 +11191,33 @@ url = (function() { switch (host) { case 'pf': - return "http://a.pomf.se/" + base; + return "https://a.pomf.se/" + base; case 'kd': - return "http://kastden.org/loopvid/" + base; + return "http://2.kastden.org/loopvid/" + base; case 'lv': return "http://loopvid.mooo.com/videos/" + base; - case 'mc': - return "https://cdn.mediacru.sh/" + base; case 'gd': return "https://docs.google.com/uc?export=download&id=" + base; case 'gh': return "https://googledrive.com/host/" + base; case 'db': - return "https://googledrive.com/host/" + base; - case 'fc': - return "//i.4cdn.org/" + base + ".webm"; + return "https://dl.dropboxusercontent.com/u/" + base; + case 'dx': + return "https://dl.dropboxusercontent.com/" + base; case 'nn': return "http://naenara.eu/loopvids/" + base; + case 'cp': + return "https://copy.com/" + base; + case 'wu': + return "http://webmup.com/" + base + "/vid.webm"; + case 'ig': + return "https://i.imgur.com/" + base; + case 'ky': + return "https://kiyo.me/" + base; + case 'fc': + return "//i.4cdn.org/" + base + ".webm"; + case 'gc': + return "https://" + type + ".gfycat.com/" + name + ".webm"; } })(); $.add(el, $.el('source', { @@ -11814,16 +11765,17 @@ }, node: function() { MarkNewIPs.ipCount = this.ipCount; + MarkNewIPs.postCount = this.posts.keys.length; return $.on(d, 'ThreadUpdate', MarkNewIPs.onUpdate); }, onUpdate: function(e) { - var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, q, ref; - ref = e.detail, ipCount = ref.ipCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; + var deletedPosts, fullID, i, ipCount, k, len1, len2, newPosts, postCount, q, ref; + ref = e.detail, ipCount = ref.ipCount, postCount = ref.postCount, newPosts = ref.newPosts, deletedPosts = ref.deletedPosts; if (ipCount == null) { return; } switch (ipCount - MarkNewIPs.ipCount) { - case newPosts.length: + case postCount - MarkNewIPs.postCount + deletedPosts.length: i = MarkNewIPs.ipCount; for (k = 0, len1 = newPosts.length; k < len1; k++) { fullID = newPosts[k]; @@ -11836,7 +11788,8 @@ MarkNewIPs.markOld(g.posts[fullID]); } } - return MarkNewIPs.ipCount = ipCount; + MarkNewIPs.ipCount = ipCount; + return MarkNewIPs.postCount = postCount; }, markNew: function(post, ipCount) { var counter, suffix; @@ -12349,11 +12302,11 @@ if (ID <= lastPost) { continue; } - newPosts.push(board + "." + ID); if ((post = thread.posts[ID]) && !post.isFetchedQuote) { post.resurrect(); continue; } + newPosts.push(board + "." + ID); node = Build.postFromObject(postObject, board.ID); posts.push(new Post(node, thread, board)); if (ThreadUpdater.postID === ID) { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 2d53c188f..788d9adbb 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 4bcf9ff12..86dc603ce 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 b2dc71f08..cd1175df5 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index c9fcacd61..8c7d86129 100755 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", - "version": "1.10.4.3", - "date": "2015-03-11T06:53:35.481Z", + "version": "1.10.4.4", + "date": "2015-03-14T02:01:27.291Z", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",