From dcad8e16861e37df197a9f9dee5e9b8c97ab8764 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 21 Sep 2011 01:20:07 -0700 Subject: [PATCH] send empty string if no error and not op --- 4chan_x.user.js | 3 +++ script.coffee | 1 + 2 files changed, 4 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index a9f3f762f..77b77af9e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1552,6 +1552,9 @@ }); } else if (node = $('meta')) { data = node.content.match(/url=(.+)/)[1]; + if (/#/.test(data)) { + data = ''; + } } return parent.postMessage(data, '*'); }); diff --git a/script.coffee b/script.coffee index 17c5ab0de..490913faf 100644 --- a/script.coffee +++ b/script.coffee @@ -1205,6 +1205,7 @@ QR = data = JSON.stringify {textContent, href} else if node = $ 'meta' data = node.content.match(/url=(.+)/)[1] + if /#/.test data then data = '' #not op parent.postMessage data, '*' #if we're an iframe, parent will blank us