do not add crossOrigin attribute on same origin scripts

c9
nightwing 2015-03-15 18:41:41 +00:00
rodzic 82b56224ba
commit 329ac9812e
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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) {