From 329ac9812e5f679a6307c9c0c1b3ece2aea672b1 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 15 Mar 2015 18:41:41 +0000 Subject: [PATCH] do not add crossOrigin attribute on same origin scripts --- plugins/c9.login.client/bootstrap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/c9.login.client/bootstrap.js b/plugins/c9.login.client/bootstrap.js index 1405cd89..6cf144b5 100644 --- a/plugins/c9.login.client/bootstrap.js +++ b/plugins/c9.login.client/bootstrap.js @@ -93,7 +93,8 @@ function loadScript(path, token, callback) { var and = path.indexOf("?") >= 0 ? "&" : "?"; s.src = path + (token ? and + "access_token=" + encodeURIComponent(token) : ""); - s.crossOrigin = true; + if (s.src.indexOf("://" + window.location.host) == -1) + s.crossOrigin = true; head.appendChild(s); s.onload = s.onreadystatechange = function(_, isAbort) {