From 1609e4996b05f176cf6c047ee3a6f105697af41b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 7 Dec 2013 13:36:48 +0100 Subject: [PATCH 01/11] Fix #1371. Xpaths are fabulous. --- src/Miscellaneous/Keybinds.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 76d817825..7414f1763 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -197,7 +197,7 @@ Keybinds = 'following' else 'preceding' - return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root + return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root Header.scrollToIfNeeded next, delta is +1 @focus next $.rmClass postEl, 'highlight' From 64418527934ed2a565f41f597bc55318d705afa4 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 7 Dec 2013 13:39:55 +0100 Subject: [PATCH 02/11] Fix #1372. --- src/Miscellaneous/Keybinds.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 7414f1763..74e55ecc1 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -109,7 +109,7 @@ Keybinds = when Conf['Deselect reply'] Keybinds.hl 0, threadRoot when Conf['Hide'] - ThreadHiding.toggle thread if g.VIEW is 'index' + ThreadHiding.toggle thread if ThreadHiding.db else return e.preventDefault() From e22aa713b3bc4354d7711ab08bf2c568d4d64a8d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 7 Dec 2013 13:58:44 +0100 Subject: [PATCH 03/11] axe -> axis --- src/Miscellaneous/Keybinds.coffee | 4 ++-- src/Miscellaneous/Nav.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 74e55ecc1..76370e38c 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -193,11 +193,11 @@ Keybinds = {height} = postEl.getBoundingClientRect() if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible root = postEl.parentNode - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root + return unless next = $.x "#{axis}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root Header.scrollToIfNeeded next, delta is +1 @focus next $.rmClass postEl, 'highlight' diff --git a/src/Miscellaneous/Nav.coffee b/src/Miscellaneous/Nav.coffee index 59c532ec1..659cce4e1 100644 --- a/src/Miscellaneous/Nav.coffee +++ b/src/Miscellaneous/Nav.coffee @@ -48,11 +48,11 @@ Nav = scroll: (delta) -> thread = Nav.getThread() - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - if next = $.x "#{axe}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread + if next = $.x "#{axis}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread # Unless we're not at the beginning of the current thread, # and thus wanting to move to beginning, # or we're above the first thread and don't want to skip it. From 0f259b488de246d9879fda741d258bf9a449e59e Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:03:02 +0100 Subject: [PATCH 04/11] Remove useles div.fileInfo for delted files. --- src/General/Build.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 292d9362b..28074703d 100644 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -120,7 +120,7 @@ Build = if file?.isDeleted fileHTML = if isOP - "
" + + "
" + "File deleted." + "
" else From 26f0fca6753ada811f143c7439e2b7ddf1af3412 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:18:24 +0100 Subject: [PATCH 05/11] Fix #1376. --- css/style.css | 4 ++-- src/Miscellaneous/FileInfo.coffee | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/css/style.css b/css/style.css index 4d4347ff1..21fb6dc8c 100644 --- a/css/style.css +++ b/css/style.css @@ -540,8 +540,8 @@ a.hide-announcement { } /* File */ -.fileText:hover .fntrunc, -.fileText:not(:hover) .fnfull, +.file-info:hover .fntrunc, +.file-info:not(:hover) .fnfull, .expanded-image > .post > .file > .fileThumb > img[data-md5], :not(.expanded-image) > .post > .file > .fileThumb > .full-image { display: none; diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 89d694313..e58f9faef 100644 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -8,7 +8,7 @@ FileInfo = cb: @node node: -> return if !@file or @isClone - @file.text.innerHTML = FileInfo.funk FileInfo, @ + @file.text.innerHTML = "#{FileInfo.funk FileInfo, @}" createFunc: (format) -> code = format.replace /%(.)/g, (s, c) -> if c of FileInfo.formatters @@ -21,11 +21,10 @@ FileInfo = return "#{size.toFixed()} Bytes" i = 1 + ['KB', 'MB'].indexOf unit size /= 1024 while i-- - size = - if unit is 'MB' - Math.round(size * 100) / 100 - else - size.toFixed() + size = if unit is 'MB' + Math.round(size * 100) / 100 + else + size.toFixed() "#{size} #{unit}" escape: (name) -> name.replace /<|>/g, (c) -> From 6396f4a55413587cb6a647dbcd77f3dff94ffa88 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:25:35 +0100 Subject: [PATCH 06/11] Changelog. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1ec0421..3e9bbf750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Minor bug fixes. + ### 3.14.2 - *2013-12-07* - Fix 4chan X breaking in threads following a 4chan markup change. From 542803ade043c099b71585da8feb418a1058065f Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:25:59 +0100 Subject: [PATCH 07/11] Release 4chan X v3.14.3. --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e9bbf750..14584f327 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 3.14.3 - *2013-12-09* + - Minor bug fixes. ### 3.14.2 - *2013-12-07* diff --git a/package.json b/package.json index 97875ede3..91fe8fcd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "3.14.2", + "version": "3.14.3", "description": "Cross-browser extension for productive lurking on 4chan.", "meta": { "name": "4chan X", From 7eb8af1755c633a62ad33b798900d11d1c839b12 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:37:50 +0100 Subject: [PATCH 08/11] Clean before releasing. --- Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 9f48729d7..940a57d49 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -151,7 +151,7 @@ module.exports = (grunt) -> 'clean:tmpuserscript' ] - grunt.registerTask 'release', ['shell:commit', 'shell:push', 'build-crx', 'compress:crx'] + grunt.registerTask 'release', ['clean', 'shell:commit', 'shell:push', 'build-crx', 'compress:crx'] grunt.registerTask 'patch', ['shell:checkout', 'bump', 'updcl:3', 'release'] grunt.registerTask 'minor', ['shell:checkout', 'bump:minor', 'updcl:2', 'release'] grunt.registerTask 'major', ['shell:checkout', 'bump:major', 'updcl:1', 'release'] From 389bdd7a1e3084080ed6a1d6e0cd7f4690aa143c Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 11:51:57 +0100 Subject: [PATCH 09/11] Update CONTRIBUTING.md. --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 735b0841c..a0c25c1e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,11 +3,12 @@ Reporting bugs: 1. Make sure both your **browser** and **4chan X** are up to date. -2. Disable your other extensions & scripts to identify [conflicts](https://github.com/MayhemYDG/4chan-x/wiki/FAQ#known-conflicting-extensions). -3. If your issue persists, open a [new issue](https://github.com/MayhemYDG/4chan-x/issues) with the following information: +2. Look at the list of [known problems and solutions](https://github.com/MayhemYDG/4chan-x/wiki/FAQ#known-problems). +3. Disable your other extensions & scripts to identify conflicts. +4. If your issue persists, open a [new issue](https://github.com/MayhemYDG/4chan-x/issues) with the following information: 1. Precise steps to reproduce the problem, with the expected and actual results. 2. Console errors, if any. - 3. Browser version. + 3. 4chan X version, browser variant, browser version, and Greasemonkey version if you are using it. 4. Your exported settings. If your settings contains sensible information (e.g. personas), edit the text file manually. Open your console with: From 91faa199e4da7240ac76c72da6eaae54e1724a59 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 12:07:00 +0100 Subject: [PATCH 10/11] Move console errors guide to the FAQ. --- CONTRIBUTING.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0c25c1e0..f301a7157 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,14 +7,10 @@ Reporting bugs: 3. Disable your other extensions & scripts to identify conflicts. 4. If your issue persists, open a [new issue](https://github.com/MayhemYDG/4chan-x/issues) with the following information: 1. Precise steps to reproduce the problem, with the expected and actual results. - 2. Console errors, if any. + 2. [Console errors](https://github.com/MayhemYDG/4chan-x/wiki/FAQ#console-errors), if any. 3. 4chan X version, browser variant, browser version, and Greasemonkey version if you are using it. 4. Your exported settings. If your settings contains sensible information (e.g. personas), edit the text file manually. -Open your console with: -- `Ctrl + Shift + J` on Chrome and Opera. -- `Ctrl + Shift + K` on Firefox. - Respect these guidelines: - Describe the issue clearly, put some effort into it. A one-liner isn't a good enough description. - If you want to get your suggestion implemented sooner, make it convincing. From d90f461dc16f1d0300d75ff98475422d236d63d4 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Mon, 9 Dec 2013 12:37:22 +0100 Subject: [PATCH 11/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f301a7157..2e13468c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,6 @@ Note: this is only used to release new 4chan X versions, and is **not** needed o ### Contribute -- Edit the CoffeeScript sources. +- Edit the sources. - If the edits affect regular users, edit the changelog. - Open a pull request.