diff --git a/CHANGELOG.md b/CHANGELOG.md index 819e92a4a..f2900810b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.7.12 +*2014-04-19* + **ccd0** - Fix conflict of previous version with Exlinks. diff --git a/LICENSE b/LICENSE index f767cbbad..4804bf83a 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.7.11 - 2014-04-19 +* 4chan X - Version 1.7.12 - 2014-04-19 * * 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 e0c296a24..560092881 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.7.11 +// @version 1.7.12 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 3df5ca98a..a6d663821 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.11 +// @version 1.7.12 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.7.11 - 2014-04-19 +* 4chan X - Version 1.7.12 - 2014-04-19 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -371,7 +371,7 @@ doc = d.documentElement; g = { - VERSION: '1.7.11', + VERSION: '1.7.12', NAMESPACE: '4chan X.', boards: {} }; @@ -1111,9 +1111,13 @@ } this.file.sizeInBytes = size; this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/thumb/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; - this.file.name = fileText.title || fileText.lastElementChild.title || fileText.lastElementChild.textContent; - this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name); - this.file.isVideo = /webm$/i.test(this.file.name); + this.file.name = fileText.title || (function() { + var nameNode; + nameNode = $('span', fileText) || $('a', fileText); + return nameNode.title || nameNode.textContent; + })(); + this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL); + this.file.isVideo = /webm$/i.test(this.file.URL); if (this.file.isImage || this.file.isVideo) { return this.file.dimensions = fileText.textContent.match(/\d+x\d+/)[0]; } diff --git a/builds/crx.crx b/builds/crx.crx index 932bcc55c..8eb72aac8 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 278a2bacf..ac6ad1f56 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.7.11", + "version": "1.7.12", "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 50d1c895b..21c8eb738 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.7.11 - 2014-04-19 +* 4chan X - Version 1.7.12 - 2014-04-19 * * Licensed under the MIT license. * https://github.com/ccd0/4chan-x/blob/master/LICENSE @@ -347,7 +347,7 @@ doc = d.documentElement; g = { - VERSION: '1.7.11', + VERSION: '1.7.12', NAMESPACE: '4chan X.', boards: {} }; @@ -1147,10 +1147,14 @@ } this.file.sizeInBytes = size; this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/thumb/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg"; - this.file.name = fileText.title || fileText.lastElementChild.title || fileText.lastElementChild.textContent; + this.file.name = fileText.title || (function() { + var nameNode; + nameNode = $('span', fileText) || $('a', fileText); + return nameNode.title || nameNode.textContent; + })(); this.file.name = this.file.name.replace(/%22/g, '"'); - this.file.isImage = /(jpg|png|gif)$/i.test(this.file.name); - this.file.isVideo = /webm$/i.test(this.file.name); + this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL); + this.file.isVideo = /webm$/i.test(this.file.URL); if (this.file.isImage || this.file.isVideo) { return this.file.dimensions = fileText.textContent.match(/\d+x\d+/)[0]; } diff --git a/builds/updates.xml b/builds/updates.xml index c7b175624..d61785e58 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index f03a2e5b5..c5a01c711 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.7.11", + "version": "1.7.12", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X",