改背景色为透明背景色

This commit is contained in:
枫谷剑仙 2021-10-11 23:35:17 +08:00
parent 78e22624bd
commit b482a7a505
1 changed files with 2 additions and 2 deletions

View File

@ -1138,7 +1138,7 @@ function loadData(force = false)
checkFormationBox();
function checkFormationBox()
{
if (formationBox.querySelector('.teams'))
if (formationBox?.querySelector('.teams'))
{
reloadFormationData();
clearInterval(formationBoxHook);
@ -1425,7 +1425,7 @@ function capture() {
titleBox.classList.remove("edit");
detailBox.classList.remove("edit");
const downLink = controlBox.querySelector(".down-capture");
html2canvas(formationBox).then(canvas => {
html2canvas(formationBox, {backgroundColor: null}).then(canvas => {
canvas.toBlob(function(blob) {
window.URL.revokeObjectURL(downLink.href);
downLink.href = URL.createObjectURL(blob);