diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a95ac8ea..c92f95669 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.7.8 +*2014-04-12* + **ccd0** - Some keybind bugfixes. - Begin work toward compatibility with new URLs. diff --git a/LICENSE b/LICENSE index 7304b63a0..fbcf8ad8b 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.7.7 - 2014-04-10 +* 4chan X - Version 1.7.8 - 2014-04-12 * * 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 70021551c..fc3598040 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.7.7 +// @version 1.7.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1e2d45f42..033725643 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.7 +// @version 1.7.8 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X @@ -24,7 +24,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.7.7 - 2014-04-10 +* 4chan X - Version 1.7.8 - 2014-04-12 * * 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.7', + VERSION: '1.7.8', NAMESPACE: '4chan X.', boards: {} }; @@ -11640,7 +11640,7 @@ return Conf[hotkey] = key; }, keydown: function(e) { - var key, notification, notifications, op, target, thread, threadRoot, _i, _len, _ref; + var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len, _ref; if (!(key = Keybinds.keyCode(e))) { return; } @@ -11728,7 +11728,9 @@ ThreadUpdater.update(); break; case 'index': - Index.update(); + if (Conf['JSON Navigation']) { + Index.update(); + } } break; case Conf['Watch']: @@ -11754,7 +11756,7 @@ }); break; case Conf['Front page']: - if (g.VIEW === 'index') { + if (Conf['JSON Navigation'] && g.VIEW === 'index') { Index.userPageNav(0); } else { window.location = "/" + g.BOARD + "/"; @@ -11764,19 +11766,39 @@ $.open("/" + g.BOARD + "/"); break; case Conf['Next page']: - if (!(g.VIEW === 'index' && Conf['Index Mode'] !== 'all pages')) { + if (g.VIEW !== 'index') { return; } - $('.next button', Index.pagelist).click(); + if (Conf['JSON Navigation']) { + if (Conf['Index Mode'] !== 'all pages') { + $('.next button', Index.pagelist).click(); + } + } else { + if (form = $('.next form')) { + window.location = form.action; + } + } break; case Conf['Previous page']: - if (!(g.VIEW === 'index' && Conf['Index Mode'] !== 'all pages')) { + if (g.VIEW !== 'index') { return; } - $('.prev button', Index.pagelist).click(); + if (Conf['JSON Navigation']) { + if (Conf['Index Mode'] !== 'all pages') { + $('.prev button', Index.pagelist).click(); + } + } else { + if (form = $('.prev form')) { + window.location = form.action; + } + } break; case Conf['Search form']: - Index.searchInput.focus(); + if (Conf['JSON Navigation']) { + Index.searchInput.focus(); + } else { + $.id('search-btn').click(); + } break; case Conf['Open catalog']: if (Conf['External Catalog']) { @@ -13289,6 +13311,7 @@ g.VIEW = (function() { switch (pathname[2]) { case 'res': + case 'thread': return 'thread'; case 'catalog': return 'catalog'; diff --git a/builds/crx.crx b/builds/crx.crx index 6e60cc597..130864128 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 9800a23df..1f47956d9 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.7.7", + "version": "1.7.8", "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 91ce5ae67..aee5cdd7a 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.7.7 - 2014-04-10 +* 4chan X - Version 1.7.8 - 2014-04-12 * * 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.7', + VERSION: '1.7.8', NAMESPACE: '4chan X.', boards: {} }; @@ -11643,7 +11643,7 @@ return Conf[hotkey] = key; }, keydown: function(e) { - var key, notification, notifications, op, target, thread, threadRoot, _i, _len, _ref; + var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len, _ref; if (!(key = Keybinds.keyCode(e))) { return; } @@ -11731,7 +11731,9 @@ ThreadUpdater.update(); break; case 'index': - Index.update(); + if (Conf['JSON Navigation']) { + Index.update(); + } } break; case Conf['Watch']: @@ -11757,7 +11759,7 @@ }); break; case Conf['Front page']: - if (g.VIEW === 'index') { + if (Conf['JSON Navigation'] && g.VIEW === 'index') { Index.userPageNav(0); } else { window.location = "/" + g.BOARD + "/"; @@ -11767,19 +11769,39 @@ $.open("/" + g.BOARD + "/"); break; case Conf['Next page']: - if (!(g.VIEW === 'index' && Conf['Index Mode'] !== 'all pages')) { + if (g.VIEW !== 'index') { return; } - $('.next button', Index.pagelist).click(); + if (Conf['JSON Navigation']) { + if (Conf['Index Mode'] !== 'all pages') { + $('.next button', Index.pagelist).click(); + } + } else { + if (form = $('.next form')) { + window.location = form.action; + } + } break; case Conf['Previous page']: - if (!(g.VIEW === 'index' && Conf['Index Mode'] !== 'all pages')) { + if (g.VIEW !== 'index') { return; } - $('.prev button', Index.pagelist).click(); + if (Conf['JSON Navigation']) { + if (Conf['Index Mode'] !== 'all pages') { + $('.prev button', Index.pagelist).click(); + } + } else { + if (form = $('.prev form')) { + window.location = form.action; + } + } break; case Conf['Search form']: - Index.searchInput.focus(); + if (Conf['JSON Navigation']) { + Index.searchInput.focus(); + } else { + $.id('search-btn').click(); + } break; case Conf['Open catalog']: if (Conf['External Catalog']) { @@ -13289,6 +13311,7 @@ g.VIEW = (function() { switch (pathname[2]) { case 'res': + case 'thread': return 'thread'; case 'catalog': return 'catalog'; diff --git a/builds/updates.xml b/builds/updates.xml index 5c043194a..12f1e8175 100644 --- a/builds/updates.xml +++ b/builds/updates.xml @@ -1,7 +1,7 @@ - + diff --git a/package.json b/package.json index b67746be4..e4e9f2bf9 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.7.7", + "version": "1.7.8", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X",