From 5c3b7ec9b1ce44282bfb507a69377cf33d4465fe Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 1 Jul 2012 11:47:21 +0200 Subject: [PATCH 1/2] Update archive redirection method. --- 4chan_x.user.js | 4 ++-- changelog | 2 ++ script.coffee | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 97dc32aae..fd38abb4b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4433,7 +4433,7 @@ case 'images.4chan.org': $.ready(function() { var url; - if (d.title === '4chan - 404' && Conf['404 Redirect']) { + if (/^4chan - 404/.test(d.title) && Conf['404 Redirect']) { path = location.pathname.split('/'); url = Redirect.image(path[1], path[3]); if (url) { @@ -4537,7 +4537,7 @@ }, ready: function() { 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)) { location.href = Redirect.thread(g.BOARD, g.THREAD_ID, location.hash); } diff --git a/changelog b/changelog index 3b0e81854..3351bd473 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Update/fix archive redirection method. 2.33.5 - Mayhem diff --git a/script.coffee b/script.coffee index ad6d13215..afb12c8d1 100644 --- a/script.coffee +++ b/script.coffee @@ -3414,7 +3414,7 @@ Main = return when 'images.4chan.org' $.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 '/' url = Redirect.image path[1], path[3] location.href = url if url @@ -3512,7 +3512,7 @@ Main = $.ready Main.ready ready: -> - if d.title is '4chan - 404' + if /^4chan - 404/.test d.title if Conf['404 Redirect'] and /^\d+$/.test g.THREAD_ID location.href = Redirect.thread g.BOARD, g.THREAD_ID, location.hash return From 6873d2eb349eab8989deb7d31282428d47ace9f1 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 1 Jul 2012 11:47:31 +0200 Subject: [PATCH 2/2] Release 2.33.6. --- 4chan_x.user.js | 6 +++--- Cakefile | 2 +- changelog | 2 ++ latest.js | 2 +- script.coffee | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index fd38abb4b..b8c7ecc7f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan x -// @version 2.33.5 +// @version 2.33.6 // @namespace aeosynth // @description Adds various features. // @copyright 2009-2011 James Campos @@ -23,7 +23,7 @@ * Copyright (c) 2009-2011 James Campos * Copyright (c) 2012 Nicolas Stepien * 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 * obtaining a copy of this software and associated documentation @@ -4742,7 +4742,7 @@ return $.globalEval(("(" + code + ")()").replace('_id_', bq.id)); }, namespace: '4chan_x.', - version: '2.33.5', + version: '2.33.6', callbacks: [], css: '\ /* dialog styling */\ diff --git a/Cakefile b/Cakefile index 92703dfe7..ee5762af2 100644 --- a/Cakefile +++ b/Cakefile @@ -2,7 +2,7 @@ {exec} = require 'child_process' fs = require 'fs' -VERSION = '2.33.5' +VERSION = '2.33.6' HEADER = """ // ==UserScript== diff --git a/changelog b/changelog index 3351bd473..cb8e24540 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master + +2.33.6 - Mayhem Update/fix archive redirection method. diff --git a/latest.js b/latest.js index 59d319320..2f8a4082f 100644 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'2.33.5'},'*') \ No newline at end of file +postMessage({version:'2.33.6'},'*') \ No newline at end of file diff --git a/script.coffee b/script.coffee index afb12c8d1..7f1fdc994 100644 --- a/script.coffee +++ b/script.coffee @@ -3660,7 +3660,7 @@ Main = $.globalEval "(#{code})()".replace '_id_', bq.id namespace: '4chan_x.' - version: '2.33.5' + version: '2.33.6' callbacks: [] css: ' /* dialog styling */