Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3

Conflicts:
	Gruntfile.js
	src/features.coffee
	src/main.coffee
This commit is contained in:
Zixaphir 2013-04-16 18:03:14 -07:00
commit 599eaef3df
12 changed files with 70 additions and 73 deletions

View File

@ -1,3 +1,8 @@
### 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.
### 3.1.3 - *2013-04-16* ### 3.1.3 - *2013-04-16*
- Fix Chrome freezing when switching from the `Filter` tab to another tab in the settings. - Fix Chrome freezing when switching from the `Filter` tab to another tab in the settings.

View File

@ -25,7 +25,7 @@ module.exports = (grunt) ->
'src/databoard.coffee' 'src/databoard.coffee'
'src/main.coffee' 'src/main.coffee'
] ]
dest: 'tmp/script.coffee' dest: 'tmp-<%= pkg.type %>/script.coffee'
crx: crx:
options: concatOptions options: concatOptions
@ -33,7 +33,7 @@ module.exports = (grunt) ->
'builds/crx/manifest.json': 'src/manifest.json' 'builds/crx/manifest.json': 'src/manifest.json'
'builds/crx/script.js': [ 'builds/crx/script.js': [
'src/banner.js' 'src/banner.js'
'tmp/script.js' 'tmp-<%= pkg.type %>/script.js'
] ]
userjs: userjs:
@ -41,7 +41,7 @@ module.exports = (grunt) ->
src: [ src: [
'src/metadata.js' 'src/metadata.js'
'src/banner.js' 'src/banner.js'
'tmp/script.js' 'tmp-<%= pkg.type %>/script.js'
] ]
dest: 'builds/<%= pkg.name %>.js' dest: 'builds/<%= pkg.name %>.js'
@ -52,7 +52,7 @@ module.exports = (grunt) ->
'builds/<%= pkg.name %>.user.js': [ 'builds/<%= pkg.name %>.user.js': [
'src/metadata.js' 'src/metadata.js'
'src/banner.js' 'src/banner.js'
'tmp/script.js' 'tmp-<%= pkg.type %>/script.js'
] ]
copy: copy:
@ -64,8 +64,15 @@ module.exports = (grunt) ->
coffee: coffee:
script: script:
src: 'tmp/script.coffee' src: 'tmp-<%= pkg.type %>/script.coffee'
dest: 'tmp/script.js' dest: 'tmp-<%= pkg.type %>/script.js'
concurrent:
build: [
'build-crx'
'build-userjs'
'build-userscript'
]
exec: exec:
commit: commit:
@ -87,6 +94,7 @@ module.exports = (grunt) ->
all: all:
options: options:
interrupt: true interrupt: true
nospawn: true
files: [ files: [
'Gruntfile.coffee' 'Gruntfile.coffee'
'package.json' 'package.json'
@ -108,10 +116,13 @@ module.exports = (grunt) ->
src: '**' src: '**'
clean: clean:
builds: 'builds' builds: 'builds'
tmp: 'tmp' tmpcrx: 'tmp-crx'
tmpuserjs: 'tmp-userjs'
tmpuserscript: 'tmp-userscript'
grunt.loadNpmTasks 'grunt-bump' grunt.loadNpmTasks 'grunt-bump'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-contrib-clean' grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee' grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-compress' grunt.loadNpmTasks 'grunt-contrib-compress'
@ -120,16 +131,16 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch' grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-exec' grunt.loadNpmTasks 'grunt-exec'
grunt.registerTask 'default', ['build'] grunt.registerTask 'default', [
'build'
]
grunt.registerTask 'set-build', 'Set the build type variable', (type) -> grunt.registerTask 'set-build', 'Set the build type variable', (type) ->
pkg.type = type; pkg.type = type;
grunt.log.ok 'pkg.type = %s', type grunt.log.ok 'pkg.type = %s', type
grunt.registerTask 'build', [ grunt.registerTask 'build', [
'build-crx' 'concurrent:build'
'build-userjs'
'build-userscript'
] ]
grunt.registerTask 'build-crx', [ grunt.registerTask 'build-crx', [
@ -138,7 +149,7 @@ module.exports = (grunt) ->
'coffee:script' 'coffee:script'
'concat:crx' 'concat:crx'
'copy:crx' 'copy:crx'
'clean:tmp' 'clean:tmpcrx'
] ]
grunt.registerTask 'build-userjs', [ grunt.registerTask 'build-userjs', [
@ -146,7 +157,7 @@ module.exports = (grunt) ->
'concat:coffee' 'concat:coffee'
'coffee:script' 'coffee:script'
'concat:userjs' 'concat:userjs'
'clean:tmp' 'clean:tmpuserjs'
] ]
grunt.registerTask 'build-userscript', [ grunt.registerTask 'build-userscript', [
@ -154,7 +165,7 @@ module.exports = (grunt) ->
'concat:coffee' 'concat:coffee'
'coffee:script' 'coffee:script'
'concat:userscript' 'concat:userscript'
'clean:tmp' 'clean:tmpuserscript'
] ]
grunt.registerTask 'release', [ grunt.registerTask 'release', [

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 3.1.3 // @version 3.1.4
// @namespace 4chan-X // @namespace 4chan-X
// @description Cross-browser extension for productive lurking on 4chan. // @description Cross-browser extension for productive lurking on 4chan.
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com> // @copyright 2009-2011 James Campos <james.r.campos@gmail.com>

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,6 +1,6 @@
{ {
"name": "4chan X", "name": "4chan X",
"version": "3.1.3", "version": "3.1.4",
"manifest_version": 2, "manifest_version": 2,
"description": "Cross-browser extension for productive lurking on 4chan.", "description": "Cross-browser extension for productive lurking on 4chan.",
"icons": { "icons": {

File diff suppressed because one or more lines are too long

View File

@ -366,8 +366,7 @@ a[href="javascript:;"] {
:root.hide-announcement #globalMessage { :root.hide-announcement #globalMessage {
display: none; display: none;
} }
a.hide-announcement, a.hide-announcement {
a.show-announcement {
float: left; float: left;
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "4chan-X", "name": "4chan-X",
"version": "3.1.3", "version": "3.1.4",
"description": "Cross-browser extension for productive lurking on 4chan.", "description": "Cross-browser extension for productive lurking on 4chan.",
"meta": { "meta": {
"name": "4chan X", "name": "4chan X",
@ -18,6 +18,7 @@
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "~0.4.1",
"grunt-bump": "~0.0.0", "grunt-bump": "~0.0.0",
"grunt-concurrent": "~0.1.1",
"grunt-contrib-clean": "~0.4.0", "grunt-contrib-clean": "~0.4.0",
"grunt-contrib-coffee": "~0.6.6", "grunt-contrib-coffee": "~0.6.6",
"grunt-contrib-compress": "~0.4.10", "grunt-contrib-compress": "~0.4.10",

View File

@ -100,7 +100,9 @@ Header =
fullBoardList.hidden = false fullBoardList.hidden = false
generateBoardList: (text) -> generateBoardList: (text) ->
list = $ '#custom-board-list', Header.nav unless list = $ '#custom-board-list', Header.nav
# init'd with the custom board list disabled.
return
$.rmAll list $.rmAll list
return unless text return unless text
as = $$('#full-board-list a', Header.nav)[0...-2] # ignore the Settings and Home links as = $$('#full-board-list a', Header.nav)[0...-2] # ignore the Settings and Home links
@ -317,7 +319,6 @@ Settings =
# and out of date extension on this device. # and out of date extension on this device.
prev = previous.match(/\d+/g).map Number prev = previous.match(/\d+/g).map Number
curr = g.VERSION.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' changelog = '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
el = $.el 'span', el = $.el 'span',
@ -1915,7 +1916,7 @@ Keybinds =
when Conf['Open settings'] when Conf['Open settings']
Settings.open() Settings.open()
when Conf['Close'] when Conf['Close']
if $.id 'fourchanx-settings' if Settings.dialog
Settings.close() Settings.close()
else if (notifications = $$ '.notification').length else if (notifications = $$ '.notification').length
for notification in notifications for notification in notifications

View File

@ -83,8 +83,6 @@ QR =
QR.posts[0].rm() QR.posts[0].rm()
QR.cooldown.auto = false QR.cooldown.auto = false
QR.status() QR.status()
if !Conf['Remember Spoiler'] and QR.nodes.spoiler.checked
QR.nodes.spoiler.click()
focusin: -> focusin: ->
$.addClass QR.nodes.el, 'has-focus' $.addClass QR.nodes.el, 'has-focus'
focusout: -> focusout: ->
@ -569,7 +567,7 @@ QR =
if @file if @file
QR.nodes.filename.textContent = @filename QR.nodes.filename.textContent = @filename
QR.nodes.filename.title = @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' $.addClass QR.nodes.fileSubmit, 'has-file'
else else
$.rmClass QR.nodes.fileSubmit, 'has-file' $.rmClass QR.nodes.fileSubmit, 'has-file'