From 2589a093e3bd22d31d7785aa5e53baf68f1fa3ab Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 12 Dec 2014 04:01:14 -0700 Subject: [PATCH] Fix posting on PaleMoon --- builds/appchan-x.user.js | 3 +++ src/General/lib/$.coffee | 3 +++ 2 files changed, 6 insertions(+) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 82725bc84..d98f315df 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -2987,6 +2987,9 @@ return onChange(key); }); return $.forceSync = function(key) { + if ($.frag().childElementCount == null) { + return; + } return onChange(g.NAMESPACE + key); }; })(); diff --git a/src/General/lib/$.coffee b/src/General/lib/$.coffee index 18bc3070f..130ad31eb 100755 --- a/src/General/lib/$.coffee +++ b/src/General/lib/$.coffee @@ -428,6 +428,9 @@ do -> $.on window, 'storage', ({key}) -> onChange key $.forceSync = (key) -> + # XXX Palemoon + return unless $.frag().childElementCount? + # Storage events don't work across origins # e.g. http://boards.4chan.org and https://boards.4chan.org # so force a check for changes to avoid lost data.