From cbfe97f93377570f607b4f7c7866d21242c5fa2d Mon Sep 17 00:00:00 2001 From: Mayhem Date: Fri, 3 May 2013 19:53:52 +0200 Subject: [PATCH 1/5] Update deps. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a53bbaf9..b28f499df 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "grunt-contrib-compress": "~0.5.0", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-copy": "~0.4.1", - "grunt-contrib-watch": "~0.3.1", + "grunt-contrib-watch": "~0.4.0", "grunt-shell": "~0.2.2" }, "repository": { From 475f166617e1d72ec1df66129f6d0e0ad532fe6b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 19:56:46 +0200 Subject: [PATCH 2/5] Don't pretty-print twice. #1079 --- src/Miscellaneous/Fourchan.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index ada48b26e..edb2fd36b 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -33,7 +33,12 @@ Fourchan = code: -> return if @isClone for pre in $$ '.prettyprint', @nodes.comment - $.event 'prettyprint', pre, window + # Don't pretty print twice: + # Might need a better way to detect if a .prettyprint + # is already pretty-printed. We can't just look for spans + # since 4chan inserts its quotes and whatnot inside. + unless $ '.pln', pre + $.event 'prettyprint', pre, window return math: -> return if @isClone or !$ '.math', @nodes.comment From 9b3628b5ae472488e0a884fd4cf0ed5ee03254a9 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 20:00:41 +0200 Subject: [PATCH 3/5] Preserve whitespaces in code tags. Fix #1079 --- CHANGELOG.md | 2 ++ src/Miscellaneous/Fourchan.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9728be6c..cc20108dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fix whitespaces not being preserved in code tags in /g/. + ## 3.3.0 - *2013-05-02* - **New feature**: `Quick Reply Personas` diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index edb2fd36b..4e1073d72 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -7,7 +7,7 @@ Fourchan = $.globalEval """ window.addEventListener('prettyprint', function(e) { var pre = e.detail; - pre.innerHTML = prettyPrintOne(pre.innerHTML); + pre.innerHTML = prettyPrintOne(pre.innerHTML.replace(/\\s/g, ' ')); }, false); """ Post::callbacks.push From fc0890049df11f7de230c4368c8a6f93cc51b20f Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 20:42:26 +0200 Subject: [PATCH 4/5] Unread scroll asap, waiting can create undesired scrolls. #1070 --- src/Monitoring/Unread.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 00231e253..1ff2c20f2 100644 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -23,7 +23,6 @@ Unread = $.on d, 'ThreadUpdate', Unread.onUpdate $.on d, 'scroll visibilitychange', Unread.read $.on d, 'visibilitychange', Unread.setLine if Conf['Unread Line'] - $.on window, 'load', Unread.scroll if Conf['Scroll to Last Read Post'] ready: -> $.off d, '4chanXInitFinished', Unread.ready @@ -31,6 +30,7 @@ Unread = for ID, post of Unread.thread.posts posts.push post if post.isReply Unread.addPosts posts + Unread.scroll() scroll: -> # Let the header's onload callback handle it. From 61f2e81c71b09ea1b01f07793b9a1b6c716125ee Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 20:43:38 +0200 Subject: [PATCH 5/5] Release 4chan X v3.3.1. --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc20108dc..89237475b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 3.3.1 - *2013-05-04* + - Fix whitespaces not being preserved in code tags in /g/. ## 3.3.0 - *2013-05-02* diff --git a/package.json b/package.json index b28f499df..36c92bc37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "3.3.0", + "version": "3.3.1", "description": "Cross-browser extension for productive lurking on 4chan.", "meta": { "name": "4chan X",