From 199ca9d01f0b3ee2b069895b634760066f841c81 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 29 Nov 2012 13:09:29 +0100 Subject: [PATCH] Fix #827 --- 4chan_x.user.js | 10 +++++----- changelog | 2 ++ script.coffee | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 1ac9e7e59..b6c866b77 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1388,7 +1388,7 @@ return $.on(d, 'keydown', Keybinds.keydown); }, keydown: function(e) { - var key, link, o, target, thread; + var form, key, o, target, thread; if (!(key = Keybinds.keyCode(e))) { return; } @@ -1455,13 +1455,13 @@ window.location = "/" + g.BOARD + "/0#delform"; break; case Conf.nextPage: - if (link = $('link[rel=next]', d.head)) { - window.location = link.href; + if (form = $('.next form')) { + window.location = form.action; } break; case Conf.previousPage: - if (link = $('link[rel=prev]', d.head)) { - window.location.href = link.href; + if (form = $('.prev form')) { + window.location = form.action; } break; case Conf.nextThread: diff --git a/changelog b/changelog index 50c5d0adf..0ae7d5a39 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Fix next/previous page keybinds. 2.36.2 - noface diff --git a/script.coffee b/script.coffee index 76b464246..289340833 100644 --- a/script.coffee +++ b/script.coffee @@ -1151,11 +1151,11 @@ Keybinds = when Conf.zero window.location = "/#{g.BOARD}/0#delform" when Conf.nextPage - if link = $ 'link[rel=next]', d.head - window.location = link.href + if form = $ '.next form' + window.location = form.action when Conf.previousPage - if link = $ 'link[rel=prev]', d.head - window.location.href = link.href + if form = $ '.prev form' + window.location = form.action # Thread Navigation when Conf.nextThread return if g.REPLY