diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c99f56a..0a8f65f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor ### v1.11.34 +**v1.11.34.1** *(2016-05-17)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.34.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.34.1/builds/4chan-X-noupdate.crx "Chromium version")] +- Fix some download button / menu item bugs. + **v1.11.34.0** *(2016-05-16)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.34.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.34.0/builds/4chan-X-noupdate.crx "Chromium version")] - Based on v1.11.33.3. - The archive list will now auto-update separately from the script. Archive updating settings are in the `Advanced` settings tab in the `Archives` section. diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index aa87d8d86..2f06b0221 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 2b3d55885..4b3496856 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.34.0 +// @version 1.11.34.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 06eaee92a..4289a0a47 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.34.0 +// @version 1.11.34.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -134,7 +134,7 @@ docSet = function() { }; g = { - VERSION: '1.11.34.0', + VERSION: '1.11.34.1', NAMESPACE: '4chan X.', boards: {} }; @@ -11836,20 +11836,27 @@ ImageCommon = (function() { return (Conf['Show Controls'] && Conf['Click Passthrough'] && e.target.nodeName === 'VIDEO') || (e.target.controls && e.target.getBoundingClientRect().bottom - e.clientY < 35); }, download: function(e) { + var download, href; if (this.protocol === 'blob:') { return true; } e.preventDefault(); - return CrossOrigin.file(this.href, (function(_this) { - return function(blob) { - if (blob) { - _this.href = URL.createObjectURL(blob); - return _this.click(); - } else { - return new Notice('warning', "Could not download " + _this.href, 20); - } - }; - })(this)); + href = this.href, download = this.download; + return CrossOrigin.file(href, function(blob) { + var a; + if (blob) { + a = $.el('a', { + href: URL.createObjectURL(blob), + download: download, + hidden: true + }); + $.add(d.body, a); + a.click(); + return $.rm(a); + } else { + return new Notice('warning', "Could not download " + href, 20); + } + }); } }; @@ -14934,8 +14941,16 @@ FileInfo = (function() { }); }, node: function() { - var info, oldInfo; - if (!this.file || this.isClone) { + var a, i, info, len, oldInfo, ref; + if (!this.file) { + return; + } + if (this.isClone) { + ref = $$('.file-info .download-button', this.file.text); + for (i = 0, len = ref.length; i < len; i++) { + a = ref[i]; + $.on(a, 'click', ImageCommon.download); + } return; } oldInfo = $.el('span', { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index bf10ba5a0..f3c1ed33f 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 a6a493526..dc3902313 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.34.0 +// @version 1.11.34.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -134,7 +134,7 @@ docSet = function() { }; g = { - VERSION: '1.11.34.0', + VERSION: '1.11.34.1', NAMESPACE: '4chan X.', boards: {} }; @@ -11836,20 +11836,27 @@ ImageCommon = (function() { return (Conf['Show Controls'] && Conf['Click Passthrough'] && e.target.nodeName === 'VIDEO') || (e.target.controls && e.target.getBoundingClientRect().bottom - e.clientY < 35); }, download: function(e) { + var download, href; if (this.protocol === 'blob:') { return true; } e.preventDefault(); - return CrossOrigin.file(this.href, (function(_this) { - return function(blob) { - if (blob) { - _this.href = URL.createObjectURL(blob); - return _this.click(); - } else { - return new Notice('warning', "Could not download " + _this.href, 20); - } - }; - })(this)); + href = this.href, download = this.download; + return CrossOrigin.file(href, function(blob) { + var a; + if (blob) { + a = $.el('a', { + href: URL.createObjectURL(blob), + download: download, + hidden: true + }); + $.add(d.body, a); + a.click(); + return $.rm(a); + } else { + return new Notice('warning', "Could not download " + href, 20); + } + }); } }; @@ -14934,8 +14941,16 @@ FileInfo = (function() { }); }, node: function() { - var info, oldInfo; - if (!this.file || this.isClone) { + var a, i, info, len, oldInfo, ref; + if (!this.file) { + return; + } + if (this.isClone) { + ref = $$('.file-info .download-button', this.file.text); + for (i = 0, len = ref.length; i < len; i++) { + a = ref[i]; + $.on(a, 'click', ImageCommon.download); + } return; } oldInfo = $.el('span', { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 30d1305cd..3ab59e41f 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 67deaa35d..ee82b6035 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.34.0 +// @version 1.11.34.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index d10c6666a..37d81b0fe 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.11.34.0 +// @version 1.11.34.1 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -134,7 +134,7 @@ docSet = function() { }; g = { - VERSION: '1.11.34.0', + VERSION: '1.11.34.1', NAMESPACE: '4chan X.', boards: {} }; @@ -11836,20 +11836,27 @@ ImageCommon = (function() { return (Conf['Show Controls'] && Conf['Click Passthrough'] && e.target.nodeName === 'VIDEO') || (e.target.controls && e.target.getBoundingClientRect().bottom - e.clientY < 35); }, download: function(e) { + var download, href; if (this.protocol === 'blob:') { return true; } e.preventDefault(); - return CrossOrigin.file(this.href, (function(_this) { - return function(blob) { - if (blob) { - _this.href = URL.createObjectURL(blob); - return _this.click(); - } else { - return new Notice('warning', "Could not download " + _this.href, 20); - } - }; - })(this)); + href = this.href, download = this.download; + return CrossOrigin.file(href, function(blob) { + var a; + if (blob) { + a = $.el('a', { + href: URL.createObjectURL(blob), + download: download, + hidden: true + }); + $.add(d.body, a); + a.click(); + return $.rm(a); + } else { + return new Notice('warning', "Could not download " + href, 20); + } + }); } }; @@ -14934,8 +14941,16 @@ FileInfo = (function() { }); }, node: function() { - var info, oldInfo; - if (!this.file || this.isClone) { + var a, i, info, len, oldInfo, ref; + if (!this.file) { + return; + } + if (this.isClone) { + ref = $$('.file-info .download-button', this.file.text); + for (i = 0, len = ref.length; i < len; i++) { + a = ref[i]; + $.on(a, 'click', ImageCommon.download); + } return; } oldInfo = $.el('span', { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 96df3aef9..cfea87692 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 3c02c46b6..d5d1471fe 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 51f78cda3..677254ffd 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index 25ca13953..24f48035c 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.11.34.0", - "date": "2016-05-16T02:00:15.864Z" + "version": "1.11.34.1", + "date": "2016-05-17T06:04:25.221Z" } \ No newline at end of file