Browse Source

改完了才发现改错了

master
枫谷剑仙 1 year ago
parent
commit
b355d07b73
4 changed files with 337 additions and 310 deletions
  1. +10
    -13
      script.js
  2. +3
    -3
      service-worker.js
  3. +315
    -290
      style-monsterimages.css
  4. +9
    -4
      style.css

+ 10
- 13
script.js View File

@@ -2560,23 +2560,20 @@ function daddbFotmationToPdfFotmation(obj)
return f;
}
//截图
function captureScreenshot(target, transparent) {
function captureScreenshot(target, filename = "capture", transparent = true) {
statusLine?.writeText(localTranslating.status_message.prepare_capture);
//去掉可能的空白文字的编辑状态
formationBox.classList.remove("edit-code");
const downLink = controlBox.querySelector(".down-capture");
setTimeout(()=>{
html2canvas(target, transparent ? {backgroundColor: null} : undefined).then(canvas => {
canvas.toBlob(function(blob) {
window.URL.revokeObjectURL(downLink.href);
downLink.href = URL.createObjectURL(blob);
downLink.download = `${document.title}.png`;
downLink.click();
statusLine?.writeText();
});
//document.body.appendChild(canvas);
html2canvas(target, transparent ? {backgroundColor: null} : undefined).then(canvas => {
canvas.toBlob(function(blob) {
window.URL.revokeObjectURL(downLink.href);
downLink.href = URL.createObjectURL(blob);
downLink.download = `${filename}.png`;
downLink.click();
statusLine?.writeText();
});
},500);
});
}
window.onload = initialize; //界面初始化
@@ -2587,7 +2584,7 @@ function initialize() {
const screenshotTransparent = document.querySelector("#screenshot-transparent");
drawScreenshot.onclick = function(event) {
if (event.target == this) {
captureScreenshot(formationBox, screenshotTransparent.checked);
captureScreenshot(formationBox, document.title, screenshotTransparent.checked);
}
}


+ 3
- 3
service-worker.js View File

@@ -36167,7 +36167,7 @@ const cachesMap = new Map([
],
[
"script.js",
"64567f934f1fa0c7e0d17f1f21228c01"
"a03eac2c81faec10c509b388225d1770"
],
[
"solo.html",
@@ -36179,11 +36179,11 @@ const cachesMap = new Map([
],
[
"style-monsterimages.css",
"6ee01e10be4d197ff7e5c638968d7634"
"b4d1d4aca6f4ed09771b460d4bfa23a2"
],
[
"style.css",
"1f2a52c15facc5a005c0b8b555acdc86"
"93bbdd79ed8ad5d2a8ec7275237e241c"
],
[
"temp.js",


+ 315
- 290
style-monsterimages.css
File diff suppressed because it is too large
View File


+ 9
- 4
style.css View File

@@ -44,8 +44,10 @@
}
}
body{
--head-block-width: 108px;
--head-block-height: 108px;
--head-width: 100px;
--head-height: 100px;
--head-block-width: calc(var(--head-width) + 8px);
--head-block-height: calc(var(--head-height) + 8px);
--search-icon-unchecked: 0.4;
--font-family : "Microsoft Yahei","Microsoft JhengHei","Source Han Sans",Arial, Helvetica, sans-serif, "Malgun Gothic", "맑은 고딕", "Gulim", AppleGothic;
--icon-font-family : 'Font Awesome Solid', "Microsoft Yahei","Microsoft JhengHei","Source Han Sans",Arial, Helvetica, sans-serif, "Malgun Gothic", "맑은 고딕", "Gulim", AppleGothic;
@@ -53,6 +55,9 @@ body{
--game-font-family : 'FOT-KurokaneStd-EB',"Microsoft Yahei","Microsoft JhengHei","Source Han Sans",Arial, Helvetica, sans-serif, "Malgun Gothic", "맑은 고딕", "Gulim", AppleGothic;
--border-width: 2px;

--awoken-width: 32px;
--awoken-height: 32px;

--badge-width: 102px;
--badge-height: 76px;

@@ -608,8 +613,8 @@ body.block-width-7 .formation-box{
/*单个怪物*/
.monster{
font-family: var(--game-font-family);
width: 100px;
height: 100px;
width: var(--head-width);
height: var(--head-height);
display: block;
background-repeat: no-repeat;
position: relative;


Loading…
Cancel
Save