diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c6ba3d0..8fb9f84e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ **Note**: Installing the script from one of the links below will disable automatic updates. If you want automatic updates, install the script from the links on the [main page](https://www.4chan-x.net/). +### v1.12.1 + +**v1.12.1.0** *(2016-07-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.1.0/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.1.0/builds/4chan-X-noupdate.crx)] +- Based on v1.12.0.7. +- Replace `Toggleable Thread Watcher` setting with `Persistent Thread Watcher` setting (off by default). With `Persistent Thread Watcher` on, the thread watcher is shown by default, but can still be hidden. +- Add `Toggle thread watcher` keybind (default: "t"). +- Make 'all websites' permission optional for Chrome extension. + ## v1.12.0 **v1.12.0.7** *(2016-07-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.crx)] diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx index e87e3c0cf..822b3eb9e 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 a4be9d91a..fce86826c 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.12.0.7 +// @version 1.12.1.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 452f4b8d4..7dc5acd4d 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.12.0.7 +// @version 1.12.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.7', + VERSION: '1.12.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -276,7 +276,7 @@ Config = (function() { 'Updater and Stats in Header': [true, 'Places the thread updater and thread stats in the header instead of floating them.'], 'Thread Watcher': [true, 'Bookmark threads.'], 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], - 'Toggleable Thread Watcher': [true, 'Adds a shortcut for the thread watcher and hides the watcher by default.', 1], + 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] }, @@ -284,7 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], - 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], + 'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -418,6 +418,7 @@ Config = (function() { 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], 'Update thread watcher': ['Shift+r', 'Manually refresh thread watcher.'], + 'Toggle thread watcher': ['t', 'Toggle visibility of thread watcher.'], 'Expand image': ['Shift+e', 'Expand selected image.'], 'Expand images': ['e', 'Expand all images.'], 'Open Gallery': ['g', 'Opens the gallery.'], @@ -2090,9 +2091,6 @@ span.hide-announcement {\n\ #thread-watcher a {\n\ text-decoration: none;\n\ }\n\ -:root:not(.toggleable-watcher) #thread-watcher .move > .close {\n\ - display: none;\n\ -}\n\ #thread-watcher .move > .close {\n\ position: absolute;\n\ right: 0px;\n\ @@ -10248,6 +10246,11 @@ Settings = (function() { set('sauces', data['sauces'].replace(/^(#?\s*)https:\/\/(?:desustorage|cuckchan)\.org\//mg, '$1https://desuarchive.org/')); } } + if (compareString < '00001.00012.00001.00000') { + if ((data['Persistent Thread Watcher'] == null) && (data['Toggleable Thread Watcher'] != null)) { + set('Persistent Thread Watcher', !data['Toggleable Thread Watcher']); + } + } return changes; }, loadSettings: function(data, cb) { @@ -15425,6 +15428,12 @@ Keybinds = (function() { } ThreadWatcher.buttonFetchAll(); break; + case Conf['Toggle thread watcher']: + if (!ThreadWatcher.enabled) { + return; + } + ThreadWatcher.toggleWatcher(); + break; case Conf['Expand image']: if (!(ImageExpand.enabled && threadRoot)) { return; @@ -17209,11 +17218,10 @@ ThreadWatcher = (function() { if (Conf['Fixed Thread Watcher']) { $.addClass(doc, 'fixed-watcher'); } - if (Conf['Toggleable Thread Watcher']) { + if (!Conf['Persistent Thread Watcher']) { this.dialog.hidden = true; - Header.addShortcut('watcher', sc, 510); - $.addClass(doc, 'toggleable-watcher'); } + Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); if (g.VIEW === 'index' && Conf['JSON Index'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ @@ -20222,7 +20230,7 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; if (URL) { open = Conf['Open Post in New Tab'] || postsCount ? function() { return $.open(URL); @@ -22324,6 +22332,7 @@ Main = (function() { Conf['Show Name and Subject'] = false; Conf['QR Shortcut'] = true; Conf['Bottom QR Link'] = true; + Conf['Toggleable Thread Watcher'] = true; if ($.platform === 'crx') { $.global(function() { var k, key, len1, oldFun, ref1, whitelist; diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx index a18c3fc71..4917de7ac 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 b6b990f4b..2ab4c94f3 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.12.0.7 +// @version 1.12.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.7', + VERSION: '1.12.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -276,7 +276,7 @@ Config = (function() { 'Updater and Stats in Header': [true, 'Places the thread updater and thread stats in the header instead of floating them.'], 'Thread Watcher': [true, 'Bookmark threads.'], 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], - 'Toggleable Thread Watcher': [true, 'Adds a shortcut for the thread watcher and hides the watcher by default.', 1], + 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] }, @@ -284,7 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], - 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], + 'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -418,6 +418,7 @@ Config = (function() { 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], 'Update thread watcher': ['Shift+r', 'Manually refresh thread watcher.'], + 'Toggle thread watcher': ['t', 'Toggle visibility of thread watcher.'], 'Expand image': ['Shift+e', 'Expand selected image.'], 'Expand images': ['e', 'Expand all images.'], 'Open Gallery': ['g', 'Opens the gallery.'], @@ -2090,9 +2091,6 @@ span.hide-announcement {\n\ #thread-watcher a {\n\ text-decoration: none;\n\ }\n\ -:root:not(.toggleable-watcher) #thread-watcher .move > .close {\n\ - display: none;\n\ -}\n\ #thread-watcher .move > .close {\n\ position: absolute;\n\ right: 0px;\n\ @@ -10248,6 +10246,11 @@ Settings = (function() { set('sauces', data['sauces'].replace(/^(#?\s*)https:\/\/(?:desustorage|cuckchan)\.org\//mg, '$1https://desuarchive.org/')); } } + if (compareString < '00001.00012.00001.00000') { + if ((data['Persistent Thread Watcher'] == null) && (data['Toggleable Thread Watcher'] != null)) { + set('Persistent Thread Watcher', !data['Toggleable Thread Watcher']); + } + } return changes; }, loadSettings: function(data, cb) { @@ -15425,6 +15428,12 @@ Keybinds = (function() { } ThreadWatcher.buttonFetchAll(); break; + case Conf['Toggle thread watcher']: + if (!ThreadWatcher.enabled) { + return; + } + ThreadWatcher.toggleWatcher(); + break; case Conf['Expand image']: if (!(ImageExpand.enabled && threadRoot)) { return; @@ -17209,11 +17218,10 @@ ThreadWatcher = (function() { if (Conf['Fixed Thread Watcher']) { $.addClass(doc, 'fixed-watcher'); } - if (Conf['Toggleable Thread Watcher']) { + if (!Conf['Persistent Thread Watcher']) { this.dialog.hidden = true; - Header.addShortcut('watcher', sc, 510); - $.addClass(doc, 'toggleable-watcher'); } + Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); if (g.VIEW === 'index' && Conf['JSON Index'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ @@ -20222,7 +20230,7 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; if (URL) { open = Conf['Open Post in New Tab'] || postsCount ? function() { return $.open(URL); @@ -22324,6 +22332,7 @@ Main = (function() { Conf['Show Name and Subject'] = false; Conf['QR Shortcut'] = true; Conf['Bottom QR Link'] = true; + Conf['Toggleable Thread Watcher'] = true; if ($.platform === 'crx') { $.global(function() { var k, key, len1, oldFun, ref1, whitelist; diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx index 6a5dcb517..4d4a8c2f9 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 01c0a6c6d..bcec2aef7 100644 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.12.0.7 +// @version 1.12.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 66fc8e175..9759f7334 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.12.0.7 +// @version 1.12.1.0 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -136,7 +136,7 @@ docSet = function() { }; g = { - VERSION: '1.12.0.7', + VERSION: '1.12.1.0', NAMESPACE: '4chan X.', boards: {} }; @@ -276,7 +276,7 @@ Config = (function() { 'Updater and Stats in Header': [true, 'Places the thread updater and thread stats in the header instead of floating them.'], 'Thread Watcher': [true, 'Bookmark threads.'], 'Fixed Thread Watcher': [true, 'Makes the thread watcher scroll with the page.', 1], - 'Toggleable Thread Watcher': [true, 'Adds a shortcut for the thread watcher and hides the watcher by default.', 1], + 'Persistent Thread Watcher': [false, 'The thread watcher will be visible when the page is loaded.', 1], 'Mark New IPs': [false, 'Label each post from a new IP with the thread\'s current IP count.'], 'Reply Pruning': [true, 'Hide old replies in long threads. Number of replies shown can be set from header menu.'] }, @@ -284,7 +284,7 @@ Config = (function() { 'Quick Reply': [true, 'All-in-one form to reply, create threads, automate dumping and more.'], 'Persistent QR': [false, 'The Quick reply won\'t disappear after posting.', 1], 'Auto Hide QR': [true, 'Automatically hide the quick reply when posting.', 1], - 'Open Post in New Tab': [true, 'Open new threads or replies to a thread from the index in a new tab.', 1], + 'Open Post in New Tab': [true, 'Open new threads in a new tab, and open replies in a new tab if you\'re not already in the thread.', 1], 'Remember QR Size': [false, 'Remember the size of the Quick reply.', 1], 'Remember Spoiler': [false, 'Remember the spoiler state, instead of resetting after posting.', 1], 'Randomize Filename': [false, 'Set the filename to a random timestamp within the past year. Disabled on /f/.', 1], @@ -418,6 +418,7 @@ Config = (function() { 'Watch': ['w', 'Watch thread.'], 'Update': ['r', 'Update the thread / refresh the index.'], 'Update thread watcher': ['Shift+r', 'Manually refresh thread watcher.'], + 'Toggle thread watcher': ['t', 'Toggle visibility of thread watcher.'], 'Expand image': ['Shift+e', 'Expand selected image.'], 'Expand images': ['e', 'Expand all images.'], 'Open Gallery': ['g', 'Opens the gallery.'], @@ -2090,9 +2091,6 @@ span.hide-announcement {\n\ #thread-watcher a {\n\ text-decoration: none;\n\ }\n\ -:root:not(.toggleable-watcher) #thread-watcher .move > .close {\n\ - display: none;\n\ -}\n\ #thread-watcher .move > .close {\n\ position: absolute;\n\ right: 0px;\n\ @@ -10248,6 +10246,11 @@ Settings = (function() { set('sauces', data['sauces'].replace(/^(#?\s*)https:\/\/(?:desustorage|cuckchan)\.org\//mg, '$1https://desuarchive.org/')); } } + if (compareString < '00001.00012.00001.00000') { + if ((data['Persistent Thread Watcher'] == null) && (data['Toggleable Thread Watcher'] != null)) { + set('Persistent Thread Watcher', !data['Toggleable Thread Watcher']); + } + } return changes; }, loadSettings: function(data, cb) { @@ -15425,6 +15428,12 @@ Keybinds = (function() { } ThreadWatcher.buttonFetchAll(); break; + case Conf['Toggle thread watcher']: + if (!ThreadWatcher.enabled) { + return; + } + ThreadWatcher.toggleWatcher(); + break; case Conf['Expand image']: if (!(ImageExpand.enabled && threadRoot)) { return; @@ -17209,11 +17218,10 @@ ThreadWatcher = (function() { if (Conf['Fixed Thread Watcher']) { $.addClass(doc, 'fixed-watcher'); } - if (Conf['Toggleable Thread Watcher']) { + if (!Conf['Persistent Thread Watcher']) { this.dialog.hidden = true; - Header.addShortcut('watcher', sc, 510); - $.addClass(doc, 'toggleable-watcher'); } + Header.addShortcut('watcher', sc, 510); ThreadWatcher.fetchAuto(); if (g.VIEW === 'index' && Conf['JSON Index'] && Conf['Menu'] && g.BOARD.ID !== 'f') { Menu.menu.addEntry({ @@ -20222,7 +20230,7 @@ QR = (function() { QR.notifications.push(new Notice('success', h1.textContent, 5)); } QR.cooldown.add(threadID, postID); - URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : g.VIEW === 'index' && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; + URL = threadID === postID ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID : threadID !== g.THREADID && lastPostToThread && Conf['Open Post in New Tab'] ? window.location.origin + "/" + g.BOARD + "/thread/" + threadID + "#p" + postID : void 0; if (URL) { open = Conf['Open Post in New Tab'] || postsCount ? function() { return $.open(URL); @@ -22324,6 +22332,7 @@ Main = (function() { Conf['Show Name and Subject'] = false; Conf['QR Shortcut'] = true; Conf['Bottom QR Link'] = true; + Conf['Toggleable Thread Watcher'] = true; if ($.platform === 'crx') { $.global(function() { var k, key, len1, oldFun, ref1, whitelist; diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip index 70d0ec878..eb7b60581 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 e78aef761..03a42fdeb 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 062119d17..1ad29f7d3 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/version.json b/version.json index ad75e5ded..edee7f668 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.12.0.7", - "date": "2016-07-06T08:35:01.248Z" + "version": "1.12.1.0", + "date": "2016-07-06T22:24:00.988Z" } \ No newline at end of file