From 192053ae99a3d5235a006877fd96058948e4978f Mon Sep 17 00:00:00 2001 From: Deathamns Date: Fri, 31 Oct 2014 19:29:44 +0100 Subject: [PATCH] document.head isn't always available in Safari --- src/js/vapi-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/vapi-client.js b/src/js/vapi-client.js index a58ed14..1fc4535 100644 --- a/src/js/vapi-client.js +++ b/src/js/vapi-client.js @@ -306,7 +306,7 @@ if (window.chrome) { "return block(u, 'xmlhttprequest') ? null : xo.apply(this, [].slice.call(arguments));", "};", "})();"].join(''); - document.head.removeChild(document.head.appendChild(tmpJS)); + document.documentElement.removeChild(document.documentElement.appendChild(tmpJS)); }; document.addEventListener('DOMSubtreeModified', firstMutation, true);