diff --git a/CHANGELOG.md b/CHANGELOG.md index 29e77926a..e27d23f2f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.7.62 +*2014-06-16* + **ccd0** - Fix errors due to tag in file info on /s4s/. diff --git a/LICENSE b/LICENSE index 8023327d4..496b0963f 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.7.61 - 2014-06-15 +* 4chan X - Version 1.7.62 - 2014-06-16 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 2f0f53abf..b539a41c8 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.7.61 +// @version 1.7.62 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 438afdc87..6ac0480e0 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.7.61 +// @version 1.7.62 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.7.61 - 2014-06-15 +* 4chan X - Version 1.7.62 - 2014-06-16 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -374,7 +374,7 @@ doc = d.documentElement; g = { - VERSION: '1.7.61', + VERSION: '1.7.62', NAMESPACE: '4chan X.', boards: {} }; @@ -1099,7 +1099,7 @@ }; Post.prototype.parseFile = function(that) { - var anchor, fileEl, fileText, size, thumb, unit, _ref; + var anchor, fileEl, fileText, nameNode, size, thumb, unit; if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) { return; } @@ -1122,14 +1122,11 @@ this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL); this.file.isVideo = /webm$/i.test(this.file.URL); + nameNode = $('a', fileText); if (this.file.isImage || this.file.isVideo) { - this.file.dimensions = (_ref = fileText.childNodes[2].textContent.match(/\d+x\d+/)) != null ? _ref[0] : void 0; + this.file.dimensions = nameNode.nextSibling.textContent.match(/\d+x\d+/)[0]; } - return this.file.name = fileText.title || (function() { - var nameNode; - nameNode = $('span', fileText) || $('a', fileText); - return (nameNode != null ? nameNode.title : void 0) || (nameNode != null ? nameNode.textContent : void 0); - })(); + return this.file.name = fileText.title || nameNode.title || nameNode.textContent; }; Post.prototype.cleanup = function(root) { @@ -12482,7 +12479,7 @@ Settings.dialog = dialog = $.el('div', { id: 'fourchanx-settings', className: 'dialog', - innerHTML: '
' + innerHTML: '
' }); $.on($('.export', Settings.dialog), 'click', Settings["export"]); $.on($('.import', Settings.dialog), 'click', Settings["import"]); @@ -13327,7 +13324,7 @@ } if (previousversion) { el = $.el('span', { - innerHTML: '4chan X has been updated to version 1.7.61.' + innerHTML: '4chan X has been updated to version 1.7.62.' }); new Notice('info', el, 15); } else { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 3ed8b2b51..75ee164b6 100644 Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ diff --git a/builds/crx.crx b/builds/crx.crx index 442a00a79..ff620e8e6 100644 Binary files a/builds/crx.crx and b/builds/crx.crx differ diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index 1610dcce4..790abe2d5 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.7.61", + "version": "1.7.62", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/crx/script.js b/builds/crx/script.js index ef7a67346..517256824 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.7.61 - 2014-06-15 +* 4chan X - Version 1.7.62 - 2014-06-16 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -349,7 +349,7 @@ doc = d.documentElement; g = { - VERSION: '1.7.61', + VERSION: '1.7.62', NAMESPACE: '4chan X.', boards: {} }; @@ -1134,7 +1134,7 @@ }; Post.prototype.parseFile = function(that) { - var anchor, fileEl, fileText, size, thumb, unit, _ref; + var anchor, fileEl, fileText, nameNode, size, thumb, unit; if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) { return; } @@ -1157,14 +1157,11 @@ this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL); this.file.isVideo = /webm$/i.test(this.file.URL); + nameNode = $('a', fileText); if (this.file.isImage || this.file.isVideo) { - this.file.dimensions = (_ref = fileText.childNodes[2].textContent.match(/\d+x\d+/)) != null ? _ref[0] : void 0; + this.file.dimensions = nameNode.nextSibling.textContent.match(/\d+x\d+/)[0]; } - return this.file.name = fileText.title || (function() { - var nameNode; - nameNode = $('span', fileText) || $('a', fileText); - return (nameNode != null ? nameNode.title : void 0) || (nameNode != null ? nameNode.textContent : void 0); - })(); + return this.file.name = fileText.title || nameNode.title || nameNode.textContent; }; Post.prototype.cleanup = function(root) { @@ -12476,7 +12473,7 @@ Settings.dialog = dialog = $.el('div', { id: 'fourchanx-settings', className: 'dialog', - innerHTML: '
' + innerHTML: '
' }); $.on($('.export', Settings.dialog), 'click', Settings["export"]); $.on($('.import', Settings.dialog), 'click', Settings["import"]); @@ -13308,7 +13305,7 @@ } if (previousversion) { el = $.el('span', { - innerHTML: '4chan X has been updated to version 1.7.61.' + innerHTML: '4chan X has been updated to version 1.7.62.' }); new Notice('info', el, 15); } else { diff --git a/builds/updates.xml b/builds/updates.xml index f1a0ad769..f764d78f5 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/builds/wcrx/manifest.json b/builds/wcrx/manifest.json index 7c2754527..c00e8061f 100644 --- a/builds/wcrx/manifest.json +++ b/builds/wcrx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.7.61", + "version": "1.7.62", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/wcrx/script.js b/builds/wcrx/script.js index ef7a67346..517256824 100644 --- a/builds/wcrx/script.js +++ b/builds/wcrx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.7.61 - 2014-06-15 +* 4chan X - Version 1.7.62 - 2014-06-16 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -349,7 +349,7 @@ doc = d.documentElement; g = { - VERSION: '1.7.61', + VERSION: '1.7.62', NAMESPACE: '4chan X.', boards: {} }; @@ -1134,7 +1134,7 @@ }; Post.prototype.parseFile = function(that) { - var anchor, fileEl, fileText, size, thumb, unit, _ref; + var anchor, fileEl, fileText, nameNode, size, thumb, unit; if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) { return; } @@ -1157,14 +1157,11 @@ this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL); this.file.isVideo = /webm$/i.test(this.file.URL); + nameNode = $('a', fileText); if (this.file.isImage || this.file.isVideo) { - this.file.dimensions = (_ref = fileText.childNodes[2].textContent.match(/\d+x\d+/)) != null ? _ref[0] : void 0; + this.file.dimensions = nameNode.nextSibling.textContent.match(/\d+x\d+/)[0]; } - return this.file.name = fileText.title || (function() { - var nameNode; - nameNode = $('span', fileText) || $('a', fileText); - return (nameNode != null ? nameNode.title : void 0) || (nameNode != null ? nameNode.textContent : void 0); - })(); + return this.file.name = fileText.title || nameNode.title || nameNode.textContent; }; Post.prototype.cleanup = function(root) { @@ -12476,7 +12473,7 @@ Settings.dialog = dialog = $.el('div', { id: 'fourchanx-settings', className: 'dialog', - innerHTML: '
' + innerHTML: '
' }); $.on($('.export', Settings.dialog), 'click', Settings["export"]); $.on($('.import', Settings.dialog), 'click', Settings["import"]); @@ -13308,7 +13305,7 @@ } if (previousversion) { el = $.el('span', { - innerHTML: '4chan X has been updated to version 1.7.61.' + innerHTML: '4chan X has been updated to version 1.7.62.' }); new Notice('info', el, 15); } else { diff --git a/package.json b/package.json index 4dfba9d0e..e59bc358c 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.7.61", + "version": "1.7.62", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X",