From c52b71742f0b460e83d447d34f2e47a284623601 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 13 Dec 2011 15:52:46 -0800 Subject: [PATCH] rm pig disgusting substring --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 655d3b7f1..c8cf95916 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2175,7 +2175,7 @@ }, x: function() { var board, id, _, _ref; - _ref = this.nextElementSibling.getAttribute('href').substring(1).split('/'), board = _ref[0], _ = _ref[1], id = _ref[2]; + _ref = this.nextElementSibling.getAttribute('href').slice(1).split('/'), board = _ref[0], _ = _ref[1], id = _ref[2]; return watcher.unwatch(board, id); } }, @@ -3040,7 +3040,7 @@ Main = { init: function() { var cutoff, hiddenThreads, id, now, pathname, temp, timestamp, update, _ref; - pathname = location.pathname.substring(1).split('/'); + pathname = location.pathname.slice(1).split('/'); g.BOARD = pathname[0], temp = pathname[1]; if (temp === 'res') { g.REPLY = temp; diff --git a/script.coffee b/script.coffee index e71ca540e..b40dcf2dd 100644 --- a/script.coffee +++ b/script.coffee @@ -1746,7 +1746,7 @@ watcher = watcher.toggle @parentNode x: -> [board, _, id] = @nextElementSibling - .getAttribute('href').substring(1).split('/') + .getAttribute('href')[1..].split('/') watcher.unwatch board, id toggle: (thread) -> @@ -2355,7 +2355,7 @@ imgExpand = Main = init: -> - pathname = location.pathname.substring(1).split('/') + pathname = location.pathname[1..].split('/') [g.BOARD, temp] = pathname if temp is 'res' g.REPLY = temp