From 2c856a9ad502c037c75535dba7d329d0a15cc587 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 1 Aug 2011 03:05:33 +0200 Subject: [PATCH] watch has a superior priority to noko --- 4chan_x.user.js | 9 ++++----- script.coffee | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 527c68c6f..b4696b7a3 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1412,12 +1412,11 @@ sage = /sage/.test(search); watch = /watch/.test(search); url = "http://boards.4chan.org/" + g.BOARD; - if (noko) { + if (watch && thread === '0') { + url += "/res/" + id + "?watch"; + } else if (noko) { url += '/res/'; - url += thread === 0 ? id : thread; - if (watch) { - url += '?watch'; - } + url += thread === '0' ? id : thread; } if (cooldown) { duration = Date.now() + (sage ? 60 : 30) * 1000; diff --git a/script.coffee b/script.coffee index 97e68700d..d4ed358ec 100644 --- a/script.coffee +++ b/script.coffee @@ -1138,11 +1138,11 @@ qr = url = "http://boards.4chan.org/#{g.BOARD}" - if noko + if watch and thread is '0' + url += "/res/#{id}?watch" + else if noko url += '/res/' - url += if thread is 0 then id else thread - if watch - url += '?watch' + url += if thread is '0' then id else thread if cooldown duration = Date.now() + (if sage then 60 else 30) * 1000 url += '?cooldown=' + duration