kopia lustrzana https://github.com/c9/core
set crossOrigin attribute on cdn scripts (+6425)
rodzic
e45d34e881
commit
898c34de0e
|
@ -211,6 +211,10 @@ var loadScript = function(path, id, callback) {
|
||||||
s.src = path;
|
s.src = path;
|
||||||
s.charset = 'utf-8';
|
s.charset = 'utf-8';
|
||||||
s.async = true;
|
s.async = true;
|
||||||
|
|
||||||
|
if (path.lastIndexOf(require.MODULE_LOAD_URL, 0) == 0)
|
||||||
|
s.crossOrigin = true;
|
||||||
|
|
||||||
head.appendChild(s);
|
head.appendChild(s);
|
||||||
|
|
||||||
s.onload = s.onreadystatechange = function(_, isAbort) {
|
s.onload = s.onreadystatechange = function(_, isAbort) {
|
||||||
|
|
|
@ -93,6 +93,7 @@ function loadScript(path, token, callback) {
|
||||||
|
|
||||||
var and = path.indexOf("?") >= 0 ? "&" : "?";
|
var and = path.indexOf("?") >= 0 ? "&" : "?";
|
||||||
s.src = path + (token ? and + "access_token=" + encodeURIComponent(token) : "");
|
s.src = path + (token ? and + "access_token=" + encodeURIComponent(token) : "");
|
||||||
|
s.crossOrigin = true;
|
||||||
head.appendChild(s);
|
head.appendChild(s);
|
||||||
|
|
||||||
s.onload = s.onreadystatechange = function(_, isAbort) {
|
s.onload = s.onreadystatechange = function(_, isAbort) {
|
||||||
|
|
Ładowanie…
Reference in New Issue