From 4fe48943efa3f019e1fe2fd3d367e66b173c7588 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 25 Dec 2017 20:00:10 +0000 Subject: [PATCH] do not leave script nodes in the document --- node_modules/architect-build/build_support/mini_require.js | 1 + package.json | 4 ++-- plugins/c9.ide.help.support/support.js | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node_modules/architect-build/build_support/mini_require.js b/node_modules/architect-build/build_support/mini_require.js index 7a5822d0..5e723adc 100644 --- a/node_modules/architect-build/build_support/mini_require.js +++ b/node_modules/architect-build/build_support/mini_require.js @@ -407,6 +407,7 @@ var loadScriptWithTag = function(path, id, callback) { s.onload = s.onreadystatechange = function(_, isAbort) { if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { + s.remove && s.remove(); s = s.onload = s.onreadystatechange = null; if (!isAbort) callback(null, id); diff --git a/package.json b/package.json index c1136696..a1c93daf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "c9", "description": "New Cloud9 Client", - "version": "3.1.4070", + "version": "3.1.5000", "author": "Ajax.org B.V. ", "private": true, "main": "bin/c9", @@ -56,4 +56,4 @@ "msgpack-js", "c9" ] -} \ No newline at end of file +} diff --git a/plugins/c9.ide.help.support/support.js b/plugins/c9.ide.help.support/support.js index 6ebcbf61..12d77934 100644 --- a/plugins/c9.ide.help.support/support.js +++ b/plugins/c9.ide.help.support/support.js @@ -146,8 +146,7 @@ define(function(require, exports, module) { s.async = true; s.src = '//api.usersnap.com/load/' + 'e3d3b232-1c21-4961-b73d-fbc8dc7be1c3.js'; - var x = document.getElementsByTagName('script')[0]; - x.parentNode.insertBefore(s, x); + document.head.appendChild(s); })(); // Create UI elements