From 60d8f0df5681e20ac9545166da94ee5fa22c4637 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 16 Apr 2013 21:15:36 +0200 Subject: [PATCH 1/8] No need to compare version numbers here. It doesn't even work properly. --- src/features.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/features.coffee b/src/features.coffee index 6070fdbbc..e23461a54 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -270,7 +270,6 @@ Settings = # and out of date extension on this device. prev = previous.match(/\d+/g).map Number curr = g.VERSION.match(/\d+/g).map Number - return unless prev[0] <= curr[0] and prev[1] <= curr[1] and prev[2] <= curr[2] changelog = '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md' el = $.el 'span', From 8a7d17c9ba1778b425727bb2c416f71993f4f364 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 16 Apr 2013 21:18:36 +0200 Subject: [PATCH 2/8] Move the flexbox notification into Main. --- src/features.coffee | 10 ---------- src/main.coffee | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/features.coffee b/src/features.coffee index e23461a54..0fd60d641 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -254,16 +254,6 @@ Settings = open: -> Conf['Enable 4chan\'s Extension'] $.get 'previousversion', null, (item) -> - <% if (type === 'userscript') { %> - el = $.el 'span' - el.style.flex = 'test' - if el.style.flex is 'test' - el.innerHTML = """ - Firefox is not correctly set up and some <%= meta.name %> features will be displayed incorrectly.
- Follow the instructions of the install guide to fix it. - """ - new Notification 'warning', el, 30 - <% } %> if previous = item['previousversion'] return if previous is g.VERSION # Avoid conflicts between sync'd newer versions diff --git a/src/main.coffee b/src/main.coffee index c99e13483..c8f33a52b 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -469,6 +469,16 @@ Main = if $.hasClass d.body, 'fourchan_x' alert '4chan X v2 detected: Disable it or v3 will break.' + <% if (type === 'userscript') { %> + el = $.el 'span' + el.style.flex = 'test' + if el.style.flex is 'test' + el.innerHTML = """ + Firefox is not correctly set up and some <%= meta.name %> features will be displayed incorrectly.
+ Follow the instructions of the install guide to fix it. + """ + new Notification 'warning', el, 30 + <% } %> $.event '4chanXInitFinished' Main.checkUpdate() From fef23ef18b06e463ca6691ee3a730d9a4fff7441 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 16 Apr 2013 22:15:09 +0200 Subject: [PATCH 3/8] Build builds concurrently. --- Gruntfile.js | 31 +++++++++++++++++++------------ package.json | 1 + 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index d73545ddd..84468860b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -25,7 +25,7 @@ module.exports = function(grunt) { 'src/databoard.coffee', 'src/main.coffee' ], - dest: 'tmp/script.coffee' + dest: 'tmp-<%= pkg.type %>/script.coffee' }, crx: { options: concatOptions, @@ -33,7 +33,7 @@ module.exports = function(grunt) { 'builds/crx/manifest.json': 'src/manifest.json', 'builds/crx/script.js': [ 'src/banner.js', - 'tmp/script.js' + 'tmp-<%= pkg.type %>/script.js' ] } }, @@ -42,7 +42,7 @@ module.exports = function(grunt) { src: [ 'src/metadata.js', 'src/banner.js', - 'tmp/script.js' + 'tmp-<%= pkg.type %>/script.js' ], dest: 'builds/<%= pkg.name %>.js' }, @@ -53,7 +53,7 @@ module.exports = function(grunt) { 'builds/<%= pkg.name %>.user.js': [ 'src/metadata.js', 'src/banner.js', - 'tmp/script.js' + 'tmp-<%= pkg.type %>/script.js' ] } } @@ -68,10 +68,13 @@ module.exports = function(grunt) { }, coffee: { script: { - src: 'tmp/script.coffee', - dest: 'tmp/script.js' + src: 'tmp-<%= pkg.type %>/script.coffee', + dest: 'tmp-<%= pkg.type %>/script.js' } }, + concurrent: { + build: ['build-crx', 'build-userjs', 'build-userscript'] + }, exec: { commit: { command: function() { @@ -93,7 +96,8 @@ module.exports = function(grunt) { watch: { all: { options: { - interrupt: true + interrupt: true, + nospawn: true }, files: [ 'Gruntfile.js', @@ -121,11 +125,14 @@ module.exports = function(grunt) { }, clean: { builds: 'builds', - tmp: 'tmp' + tmpcrx: 'tmp-crx', + tmpuserjs: 'tmp-userjs', + tmpuserscript: 'tmp-userscript' } }); grunt.loadNpmTasks('grunt-bump'); + grunt.loadNpmTasks('grunt-concurrent'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-compress'); @@ -140,28 +147,28 @@ module.exports = function(grunt) { pkg.type = type; grunt.log.ok('pkg.type = %s', type); }); - grunt.registerTask('build', ['build-crx', 'build-userjs', 'build-userscript']); + grunt.registerTask('build', ['concurrent:build']); grunt.registerTask('build-crx', [ 'set-build:crx', 'concat:coffee', 'coffee:script', 'concat:crx', 'copy:crx', - 'clean:tmp' + 'clean:tmpcrx' ]); grunt.registerTask('build-userjs', [ 'set-build:userjs', 'concat:coffee', 'coffee:script', 'concat:userjs', - 'clean:tmp' + 'clean:tmpuserjs' ]); grunt.registerTask('build-userscript', [ 'set-build:userscript', 'concat:coffee', 'coffee:script', 'concat:userscript', - 'clean:tmp' + 'clean:tmpuserscript' ]); grunt.registerTask('release', ['exec:commit', 'exec:push', 'build-crx', 'compress:crx']); diff --git a/package.json b/package.json index a426e6c75..1217da64f 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "grunt": "~0.4.1", "grunt-bump": "~0.0.0", + "grunt-concurrent": "~0.1.1", "grunt-contrib-clean": "~0.4.0", "grunt-contrib-coffee": "~0.6.6", "grunt-contrib-compress": "~0.4.10", From 48267c24621703f1e307016269e38958b6fea518 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 16 Apr 2013 22:32:55 +0200 Subject: [PATCH 4/8] Don't float the show-announcement button. --- css/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 7426d3c8d..aefedc2c3 100644 --- a/css/style.css +++ b/css/style.css @@ -374,8 +374,7 @@ a[href="javascript:;"] { :root.hide-announcement #globalMessage { display: none; } -a.hide-announcement, -a.show-announcement { +a.hide-announcement { float: left; } From 3a674b81f2634a0a70f9607837972457edb7e227 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 16 Apr 2013 23:34:26 +0200 Subject: [PATCH 5/8] Fix #1043. --- CHANGELOG.md | 2 ++ src/features.coffee | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d3b7d08f..b6563eb0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fix inputs in the `Rice` tab being empty when `Custom Board Navigation` is disabled. + ### 3.1.3 - *2013-04-16* - Fix Chrome freezing when switching from the `Filter` tab to another tab in the settings. diff --git a/src/features.coffee b/src/features.coffee index 0fd60d641..fc8fced97 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -85,7 +85,9 @@ Header = Header.setCatalogLinks Conf['Header catalog links'] generateBoardList: (text) -> - list = $ '#custom-board-list', Header.bar + unless list = $ '#custom-board-list', Header.bar + # init'd with the custom board list disabled. + return $.rmAll list return unless text as = $$('#full-board-list a', Header.bar)[0...-2] # ignore the Settings and Home links From aebf540551512a15f52c98ee0de86ca6c9984482 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 17 Apr 2013 00:12:45 +0200 Subject: [PATCH 6/8] Fix QR preserving the spoiler status. --- CHANGELOG.md | 1 + src/qr.coffee | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6563eb0a..3b2aea9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Fix QR remembering the file spoiler state when it shouldn't, for real this time. - Fix inputs in the `Rice` tab being empty when `Custom Board Navigation` is disabled. ### 3.1.3 - *2013-04-16* diff --git a/src/qr.coffee b/src/qr.coffee index 30c6b0a84..f64c88a37 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -78,8 +78,6 @@ QR = QR.posts[0].rm() QR.cooldown.auto = false QR.status() - if !Conf['Remember Spoiler'] and QR.nodes.spoiler.checked - QR.nodes.spoiler.click() focusin: -> $.addClass QR.nodes.el, 'has-focus' focusout: -> @@ -563,7 +561,7 @@ QR = if @file QR.nodes.filename.textContent = @filename QR.nodes.filename.title = @filename - QR.nodes.spoiler.checked = @spoiler if QR.spoiler + QR.nodes.spoiler.checked = @spoiler $.addClass QR.nodes.fileSubmit, 'has-file' else $.rmClass QR.nodes.fileSubmit, 'has-file' From 94f29bc495083acdd545542deb6dc63c40e8aa55 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 17 Apr 2013 00:14:49 +0200 Subject: [PATCH 7/8] No need to search for the settings dialog when closing via keybind. --- src/features.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features.coffee b/src/features.coffee index fc8fced97..fbc45b7ed 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1848,7 +1848,7 @@ Keybinds = when Conf['Open settings'] Settings.open() when Conf['Close'] - if $.id 'fourchanx-settings' + if Settings.dialog Settings.close() else if (notifications = $$ '.notification').length for notification in notifications From 76e98ea87d9d03a922b79c58ebbdb84a6d4c76a1 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 17 Apr 2013 00:16:16 +0200 Subject: [PATCH 8/8] Release 4chan X v3.1.4. --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2aea9c8..81fb35c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 3.1.4 - *2013-04-17* + - Fix QR remembering the file spoiler state when it shouldn't, for real this time. - Fix inputs in the `Rice` tab being empty when `Custom Board Navigation` is disabled. diff --git a/package.json b/package.json index 1217da64f..a3869bc44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "3.1.3", + "version": "3.1.4", "description": "Cross-browser extension for productive lurking on 4chan.", "meta": { "name": "4chan X",