From a7f255fa26fcb98aed6fdb1a1451324c20559a0c Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 15 Jan 2013 15:42:01 +0100 Subject: [PATCH] fixes --- 4chan_x.user.js | 4 ++-- lib/$.coffee | 5 ++--- src/features.coffee | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 7eeda2e87..8b6210696 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -606,7 +606,7 @@ $.add(d.head, script); return $.rm(script); }, - unsafeWindow: unitTesting || window.opera ? window : unsafeWindow !== window ? unsafeWindow : (function() { + unsafeWindow: window.opera ? window : unsafeWindow !== window ? unsafeWindow : (function() { var p; p = d.createElement('p'); p.setAttribute('onclick', 'return window'); @@ -1191,7 +1191,7 @@ if (this.isClone) { return; } - _ref = $$('.deadlink', post.blockquote); + _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; if (deadlink.parentNode.className === 'prettyprint') { diff --git a/lib/$.coffee b/lib/$.coffee index fb4b6ee08..8621e6040 100644 --- a/lib/$.coffee +++ b/lib/$.coffee @@ -167,9 +167,8 @@ $.extend $, $.rm script # http://mths.be/unsafewindow unsafeWindow: - if unitTesting or # unit testing - window.opera # Opera - window + if window.opera # Opera + window else if unsafeWindow isnt window # Firefox unsafeWindow else # Chrome diff --git a/src/features.coffee b/src/features.coffee index f8e728062..1b4552e84 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -545,7 +545,7 @@ Quotify = cb: @node node: -> return if @isClone - for deadlink in $$ '.deadlink', post.blockquote + for deadlink in $$ '.deadlink', @nodes.comment if deadlink.parentNode.className is 'prettyprint' # Don't quotify deadlinks inside code tags, # un-`span` them.