Merge branch 'master' into menu

This commit is contained in:
Nicolas Stepien 2012-07-01 11:47:45 +02:00
commit 6e21bd123a
5 changed files with 14 additions and 10 deletions

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan x // @name 4chan x
// @version 2.33.5 // @version 2.33.6
// @namespace aeosynth // @namespace aeosynth
// @description Adds various features. // @description Adds various features.
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com> // @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
@ -23,7 +23,7 @@
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com> * Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
* Copyright (c) 2012 Nicolas Stepien <stepien.nicolas@gmail.com> * Copyright (c) 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
* http://mayhemydg.github.com/4chan-x/ * http://mayhemydg.github.com/4chan-x/
* 4chan X 2.33.5 * 4chan X 2.33.6
* *
* Permission is hereby granted, free of charge, to any person * Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation * obtaining a copy of this software and associated documentation
@ -4636,7 +4636,7 @@
case 'images.4chan.org': case 'images.4chan.org':
$.ready(function() { $.ready(function() {
var url; var url;
if (d.title === '4chan - 404' && Conf['404 Redirect']) { if (/^4chan - 404/.test(d.title) && Conf['404 Redirect']) {
path = location.pathname.split('/'); path = location.pathname.split('/');
url = Redirect.image(path[1], path[3]); url = Redirect.image(path[1], path[3]);
if (url) { if (url) {
@ -4749,7 +4749,7 @@
}, },
ready: function() { ready: function() {
var MutationObserver, a, board, nav, node, nodes, observer, _i, _j, _len, _len1, _ref, _ref1; var MutationObserver, a, board, nav, node, nodes, observer, _i, _j, _len, _len1, _ref, _ref1;
if (d.title === '4chan - 404') { if (/^4chan - 404/.test(d.title)) {
if (Conf['404 Redirect'] && /^\d+$/.test(g.THREAD_ID)) { if (Conf['404 Redirect'] && /^\d+$/.test(g.THREAD_ID)) {
location.href = Redirect.thread(g.BOARD, g.THREAD_ID, location.hash); location.href = Redirect.thread(g.BOARD, g.THREAD_ID, location.hash);
} }
@ -4954,7 +4954,7 @@
return $.globalEval(("(" + code + ")()").replace('_id_', bq.id)); return $.globalEval(("(" + code + ")()").replace('_id_', bq.id));
}, },
namespace: '4chan_x.', namespace: '4chan_x.',
version: '2.33.5', version: '2.33.6',
callbacks: [], callbacks: [],
css: '\ css: '\
/* dialog styling */\ /* dialog styling */\

View File

@ -2,7 +2,7 @@
{exec} = require 'child_process' {exec} = require 'child_process'
fs = require 'fs' fs = require 'fs'
VERSION = '2.33.5' VERSION = '2.33.6'
HEADER = """ HEADER = """
// ==UserScript== // ==UserScript==

View File

@ -1,5 +1,9 @@
master master
2.33.6
- Mayhem
Update/fix archive redirection method.
2.33.5 2.33.5
- Mayhem - Mayhem
Add /sp/ archive redirection. Add /sp/ archive redirection.

View File

@ -1 +1 @@
postMessage({version:'2.33.5'},'*') postMessage({version:'2.33.6'},'*')

View File

@ -3590,7 +3590,7 @@ Main =
return return
when 'images.4chan.org' when 'images.4chan.org'
$.ready -> $.ready ->
if d.title is '4chan - 404' and Conf['404 Redirect'] if /^4chan - 404/.test(d.title) and Conf['404 Redirect']
path = location.pathname.split '/' path = location.pathname.split '/'
url = Redirect.image path[1], path[3] url = Redirect.image path[1], path[3]
location.href = url if url location.href = url if url
@ -3697,7 +3697,7 @@ Main =
$.ready Main.ready $.ready Main.ready
ready: -> ready: ->
if d.title is '4chan - 404' if /^4chan - 404/.test d.title
if Conf['404 Redirect'] and /^\d+$/.test g.THREAD_ID if Conf['404 Redirect'] and /^\d+$/.test g.THREAD_ID
location.href = Redirect.thread g.BOARD, g.THREAD_ID, location.hash location.href = Redirect.thread g.BOARD, g.THREAD_ID, location.hash
return return
@ -3845,7 +3845,7 @@ Main =
$.globalEval "(#{code})()".replace '_id_', bq.id $.globalEval "(#{code})()".replace '_id_', bq.id
namespace: '4chan_x.' namespace: '4chan_x.'
version: '2.33.5' version: '2.33.6'
callbacks: [] callbacks: []
css: ' css: '
/* dialog styling */ /* dialog styling */