diff --git a/CHANGELOG.md b/CHANGELOG.md index fd2bc7449..571c9091d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x). +### v1.10.8 + +**v1.10.8.0** *(2015-04-05)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.0/builds/4chan-X-noupdate.crx "Chromium version")] +- Based on v1.10.7.4. +- Make the thread watcher remember whether it was closed or open. +- Remove the close button from the thread watcher when `Toggleable Thread Watcher` is disabled. +- Add an API for getting and setting the contents of the selected file in the Quick Reply (`QRGetFile`, `QRFile`, and `QRSetFile` events). + ### v1.10.7 **v1.10.7.4** *(2015-04-05)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.7.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.7.4/builds/4chan-X-noupdate.crx "Chromium version")] diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index f6a5d5de2..dbc1db9a3 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 4143f4b5a..fd126169b 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.7.4 +// @version 1.10.8.0 // @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 b1eca573d..f0d5592bf 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.7.4 +// @version 1.10.8.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -278,6 +278,7 @@ 'Auto Prune': [false, 'Automatically remove dead threads.'], 'Show Unread Count': [true, 'Show number of unread posts in watched threads.'] }, + 'Thread Watcher Hidden': true, filter: { name: "# Filter any namefags:\n#/^(?!Anonymous$)/", uniqueID: "# Filter a specific ID:\n#/Txhvk1Tl/", @@ -395,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.7.4', + VERSION: '1.10.8.0', NAMESPACE: '4chan X.', boards: {} }; @@ -6760,6 +6761,8 @@ $.prepend($('.navLinksBot'), linkBot); } $.before($.id('togglePostFormLink'), link); + $.on(d, 'QRGetFile', QR.getFile); + $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); $.on(d, 'dragover', QR.dragOver); $.on(d, 'drop', QR.dropFile); @@ -7045,6 +7048,19 @@ counter.hidden = count < 1000; return (count > 1500 ? $.addClass : $.rmClass)(counter, 'warning'); }, + getFile: function() { + var ref; + return $.event('QRFile', (ref = QR.selected) != null ? ref.file : void 0); + }, + setFile: function(e) { + var file, name, ref; + ref = e.detail, file = ref.file, name = ref.name; + if (name != null) { + file.name = name; + } + QR.open(); + return QR.handleFiles([file]); + }, drag: function(e) { var toggle; toggle = e.type === 'dragstart' ? $.off : $.on; @@ -12394,11 +12410,17 @@ this.status = $('#watcher-status', this.dialog); this.list = this.dialog.lastElementChild; this.refreshButton = $('.refresh', this.dialog); + this.closeButon = $('.move > .close', this.dialog); this.unreaddb = Unread.db || new DataBoard('lastReadPosts'); + this.closeButon.hidden = !Conf['Toggleable Thread Watcher']; + if (Conf['Toggleable Thread Watcher']) { + this.setHidden(Conf['Thread Watcher Hidden']); + $.sync('Thread Watcher Hidden', this.setHidden); + } $.on(d, 'QRPostSuccessful', this.cb.post); - $.on(sc, 'click', this.toggleWatcher); + $.on(sc, 'click', this.toggleHidden); $.on(this.refreshButton, 'click', this.fetchAllStatus); - $.on($('.move > .close', this.dialog), 'click', this.toggleWatcher); + $.on(this.closeButon, 'click', this.toggleHidden); $.on(d, '4chanXInitFinished', this.ready); switch (g.VIEW) { case 'index': @@ -12490,9 +12512,6 @@ } ThreadWatcher.refresh(); $.add(d.body, ThreadWatcher.dialog); - if (Conf['Toggleable Thread Watcher']) { - ThreadWatcher.dialog.hidden = true; - } if (!Conf['Auto Watch']) { return; } @@ -12506,9 +12525,16 @@ return $["delete"]('AutoWatch'); }); }, - toggleWatcher: function() { - $.toggleClass(ThreadWatcher.shortcut, 'disabled'); - return ThreadWatcher.dialog.hidden = !ThreadWatcher.dialog.hidden; + setHidden: function(hide) { + ThreadWatcher.shortcut.classList.toggle('disabled', hide); + ThreadWatcher.dialog.hidden = hide; + return Conf['Thread Watcher Hidden'] = hide; + }, + toggleHidden: function() { + var hide; + hide = !ThreadWatcher.dialog.hidden; + ThreadWatcher.setHidden(hide); + return $.set('Thread Watcher Hidden', hide); }, cb: { openAll: function() { diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index 5f871c5de..e691308b6 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 ce0efd060..de1456d81 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.7.4 +// @version 1.10.8.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -277,6 +277,7 @@ 'Auto Prune': [false, 'Automatically remove dead threads.'], 'Show Unread Count': [true, 'Show number of unread posts in watched threads.'] }, + 'Thread Watcher Hidden': true, filter: { name: "# Filter any namefags:\n#/^(?!Anonymous$)/", uniqueID: "# Filter a specific ID:\n#/Txhvk1Tl/", @@ -394,7 +395,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.7.4', + VERSION: '1.10.8.0', NAMESPACE: '4chan X.', boards: {} }; @@ -6759,6 +6760,8 @@ $.prepend($('.navLinksBot'), linkBot); } $.before($.id('togglePostFormLink'), link); + $.on(d, 'QRGetFile', QR.getFile); + $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); $.on(d, 'dragover', QR.dragOver); $.on(d, 'drop', QR.dropFile); @@ -7044,6 +7047,19 @@ counter.hidden = count < 1000; return (count > 1500 ? $.addClass : $.rmClass)(counter, 'warning'); }, + getFile: function() { + var ref; + return $.event('QRFile', (ref = QR.selected) != null ? ref.file : void 0); + }, + setFile: function(e) { + var file, name, ref; + ref = e.detail, file = ref.file, name = ref.name; + if (name != null) { + file.name = name; + } + QR.open(); + return QR.handleFiles([file]); + }, drag: function(e) { var toggle; toggle = e.type === 'dragstart' ? $.off : $.on; @@ -12393,11 +12409,17 @@ this.status = $('#watcher-status', this.dialog); this.list = this.dialog.lastElementChild; this.refreshButton = $('.refresh', this.dialog); + this.closeButon = $('.move > .close', this.dialog); this.unreaddb = Unread.db || new DataBoard('lastReadPosts'); + this.closeButon.hidden = !Conf['Toggleable Thread Watcher']; + if (Conf['Toggleable Thread Watcher']) { + this.setHidden(Conf['Thread Watcher Hidden']); + $.sync('Thread Watcher Hidden', this.setHidden); + } $.on(d, 'QRPostSuccessful', this.cb.post); - $.on(sc, 'click', this.toggleWatcher); + $.on(sc, 'click', this.toggleHidden); $.on(this.refreshButton, 'click', this.fetchAllStatus); - $.on($('.move > .close', this.dialog), 'click', this.toggleWatcher); + $.on(this.closeButon, 'click', this.toggleHidden); $.on(d, '4chanXInitFinished', this.ready); switch (g.VIEW) { case 'index': @@ -12489,9 +12511,6 @@ } ThreadWatcher.refresh(); $.add(d.body, ThreadWatcher.dialog); - if (Conf['Toggleable Thread Watcher']) { - ThreadWatcher.dialog.hidden = true; - } if (!Conf['Auto Watch']) { return; } @@ -12505,9 +12524,16 @@ return $["delete"]('AutoWatch'); }); }, - toggleWatcher: function() { - $.toggleClass(ThreadWatcher.shortcut, 'disabled'); - return ThreadWatcher.dialog.hidden = !ThreadWatcher.dialog.hidden; + setHidden: function(hide) { + ThreadWatcher.shortcut.classList.toggle('disabled', hide); + ThreadWatcher.dialog.hidden = hide; + return Conf['Thread Watcher Hidden'] = hide; + }, + toggleHidden: function() { + var hide; + hide = !ThreadWatcher.dialog.hidden; + ThreadWatcher.setHidden(hide); + return $.set('Thread Watcher Hidden', hide); }, cb: { openAll: function() { diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index a6b731c97..d9b1d6514 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 e75373118..4d94693ba 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.10.7.4 +// @version 1.10.8.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 5ce801c9c..1ead5238c 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.7.4 +// @version 1.10.8.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -278,6 +278,7 @@ 'Auto Prune': [false, 'Automatically remove dead threads.'], 'Show Unread Count': [true, 'Show number of unread posts in watched threads.'] }, + 'Thread Watcher Hidden': true, filter: { name: "# Filter any namefags:\n#/^(?!Anonymous$)/", uniqueID: "# Filter a specific ID:\n#/Txhvk1Tl/", @@ -395,7 +396,7 @@ doc = d.documentElement; g = { - VERSION: '1.10.7.4', + VERSION: '1.10.8.0', NAMESPACE: '4chan X.', boards: {} }; @@ -6760,6 +6761,8 @@ $.prepend($('.navLinksBot'), linkBot); } $.before($.id('togglePostFormLink'), link); + $.on(d, 'QRGetFile', QR.getFile); + $.on(d, 'QRSetFile', QR.setFile); $.on(d, 'paste', QR.paste); $.on(d, 'dragover', QR.dragOver); $.on(d, 'drop', QR.dropFile); @@ -7045,6 +7048,19 @@ counter.hidden = count < 1000; return (count > 1500 ? $.addClass : $.rmClass)(counter, 'warning'); }, + getFile: function() { + var ref; + return $.event('QRFile', (ref = QR.selected) != null ? ref.file : void 0); + }, + setFile: function(e) { + var file, name, ref; + ref = e.detail, file = ref.file, name = ref.name; + if (name != null) { + file.name = name; + } + QR.open(); + return QR.handleFiles([file]); + }, drag: function(e) { var toggle; toggle = e.type === 'dragstart' ? $.off : $.on; @@ -12394,11 +12410,17 @@ this.status = $('#watcher-status', this.dialog); this.list = this.dialog.lastElementChild; this.refreshButton = $('.refresh', this.dialog); + this.closeButon = $('.move > .close', this.dialog); this.unreaddb = Unread.db || new DataBoard('lastReadPosts'); + this.closeButon.hidden = !Conf['Toggleable Thread Watcher']; + if (Conf['Toggleable Thread Watcher']) { + this.setHidden(Conf['Thread Watcher Hidden']); + $.sync('Thread Watcher Hidden', this.setHidden); + } $.on(d, 'QRPostSuccessful', this.cb.post); - $.on(sc, 'click', this.toggleWatcher); + $.on(sc, 'click', this.toggleHidden); $.on(this.refreshButton, 'click', this.fetchAllStatus); - $.on($('.move > .close', this.dialog), 'click', this.toggleWatcher); + $.on(this.closeButon, 'click', this.toggleHidden); $.on(d, '4chanXInitFinished', this.ready); switch (g.VIEW) { case 'index': @@ -12490,9 +12512,6 @@ } ThreadWatcher.refresh(); $.add(d.body, ThreadWatcher.dialog); - if (Conf['Toggleable Thread Watcher']) { - ThreadWatcher.dialog.hidden = true; - } if (!Conf['Auto Watch']) { return; } @@ -12506,9 +12525,16 @@ return $["delete"]('AutoWatch'); }); }, - toggleWatcher: function() { - $.toggleClass(ThreadWatcher.shortcut, 'disabled'); - return ThreadWatcher.dialog.hidden = !ThreadWatcher.dialog.hidden; + setHidden: function(hide) { + ThreadWatcher.shortcut.classList.toggle('disabled', hide); + ThreadWatcher.dialog.hidden = hide; + return Conf['Thread Watcher Hidden'] = hide; + }, + toggleHidden: function() { + var hide; + hide = !ThreadWatcher.dialog.hidden; + ThreadWatcher.setHidden(hide); + return $.set('Thread Watcher Hidden', hide); }, cb: { openAll: function() { diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index b5d6e536e..53ddde54b 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 893851489..3867a0937 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 5267cfbce..e0c2af7b3 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index 1d3f4e5ea..02d23bb72 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.7.4", - "date": "2015-04-05T09:13:34.908Z", + "version": "1.10.8.0", + "date": "2015-04-05T22:25:55.676Z", "repo": "https://github.com/ccd0/4chan-x/", "page": "https://github.com/ccd0/4chan-x", "downloads": "https://ccd0.github.io/4chan-x/builds/",