From a6acb5089266901aa9160da2530224a9d673c18e Mon Sep 17 00:00:00 2001 From: Deathamns Date: Fri, 9 Jan 2015 07:58:07 +0100 Subject: [PATCH] Firefox: fixed content scripts? --- platform/firefox/vapi-client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index d0a05ed..4886bb6 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -149,14 +149,16 @@ vAPI.messaging = { /******************************************************************************/ var toggleListener = function({type, persisted}) { - if ( !persisted || !vAPI.messaging.connector ) { + if ( !vAPI.messaging.connector ) { return; } if ( type === 'pagehide' ) { removeMessageListener(); + return; } - else { + + if ( persisted ) { addMessageListener(vAPI.messaging.connector); } };