mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
more cross-origin fixes
This commit is contained in:
parent
7a4af4df41
commit
c00fc0c615
@ -42,6 +42,9 @@ class loadSong{
|
|||||||
var skinBase = gameConfig.assets_baseurl + "song_skins/"
|
var skinBase = gameConfig.assets_baseurl + "song_skins/"
|
||||||
for(var i = 0; i < imgLoad.length; i++){
|
for(var i = 0; i < imgLoad.length; i++){
|
||||||
let img = document.createElement("img")
|
let img = document.createElement("img")
|
||||||
|
if(this.touchEnabled && imgLoad[i].type === "song"){
|
||||||
|
img.crossOrigin = "Anonymous"
|
||||||
|
}
|
||||||
let filename = imgLoad[i].filename
|
let filename = imgLoad[i].filename
|
||||||
let promise = pageEvents.load(img)
|
let promise = pageEvents.load(img)
|
||||||
if(imgLoad[i].type === "song"){
|
if(imgLoad[i].type === "song"){
|
||||||
@ -96,7 +99,9 @@ class loadSong{
|
|||||||
for(var i = 0; i < 2; i++){
|
for(var i = 0; i < 2; i++){
|
||||||
let filenameAb = filename + (i === 0 ? "a" : "b")
|
let filenameAb = filename + (i === 0 ? "a" : "b")
|
||||||
let img = document.createElement("img")
|
let img = document.createElement("img")
|
||||||
|
if(this.touchEnabled){
|
||||||
img.crossOrigin = "Anonymous"
|
img.crossOrigin = "Anonymous"
|
||||||
|
}
|
||||||
promises.push(pageEvents.load(img).then(() => {
|
promises.push(pageEvents.load(img).then(() => {
|
||||||
return this.scaleImg(img, filenameAb)
|
return this.scaleImg(img, filenameAb)
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user