From e89503d6e6b5a5ef76becd3536957aeca0fdd82a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Sat, 18 Apr 2020 00:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9A=90=E8=97=8F=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E9=89=B4=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- help.md | 2 ++ script.js | 10 ++++++++++ style.css | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/help.md b/help.md index baa21eec..132ccb87 100644 --- a/help.md +++ b/help.md @@ -31,6 +31,8 @@ Formation Title and Detail can use the `^[Hex Color Code]^Content^p` to change t The 2P, 3P Multi Games Mode shows only the statistics of general awakening (excluding super-awakening), and 2P only show several common awoken statistics, but the Solo Mode shows all. * 内建的截图按钮依靠 [html2canvas](https://github.com/niklasvh/html2canvas/),会有一些绘制错误,浏览器的截图扩展能够更加还原显示的真实样子。 Built-in screenshot button relies on [html2canvas](https://github.com/niklasvh/html2canvas/), there will be some drawing errors, browser screenshot extension can be more restore the real appearance of the display. +* 如果你只是希望将本程序当作简单图鉴使用,可以在参数里加上`guide=1`,如`http://mapaler.gitee.io/paddashformation/solo.html?guide=1`。图鉴模式下进入网页时,会直接打开怪物修改界面,并且背景不透明。 +If you just want to use this program as a simple guide, you can add `guide=1` to the parameters, such as `https://mapaler.github.io/PADDashFormation/solo.html?guide=1`. When you enter the page in guide mode, the monster modification interface opens directly and the background is opaque. ## 报告BUG | Report BUG 如果发现 BUG,请先按 Ctrl+F5 强制刷新后测试,如仍有问题可以在 [Issues](//github.com/Mapaler/PADDashFormation/issues) 报告。 diff --git a/script.js b/script.js index 279d70ef..e5a43331 100644 --- a/script.js +++ b/script.js @@ -2,6 +2,7 @@ var Cards; //怪物数据 var Skills; //技能数据 var currentLanguage; //当前语言 var currentDataSource; //当前数据 +var isGuideMod; //是否以图鉴模式启动 const teamBigBoxs = []; //储存全部teamBigBox const allMembers = []; //储存所有成员,包含辅助 @@ -313,9 +314,15 @@ window.onload = function() toggleDomClassName(controlBox.querySelector("#show-mon-id"),'not-show-mon-id',false); toggleDomClassName(controlBox.querySelector("#btn-show-mon-skill-cd"),'show-mon-skill-cd'); toggleDomClassName(controlBox.querySelector("#btn-show-awoken-count"),'not-show-awoken-count',false); + isGuideMod = Boolean(parseInt(getQueryString("guide"))); formationBox = document.body.querySelector(".formation-box"); editBox = document.body.querySelector(".edit-box"); + if (isGuideMod) + { + console.log('现在是 怪物图鉴 模式'); + document.body.classList.add('guide-mod'); + } if (location.hostname.includes("gitee")) { helpLink.hostname = "gitee.com"; } @@ -1424,6 +1431,9 @@ function initialize() languageJS.id = "language-js"; languageJS.type = "text/javascript"; languageJS.src = "languages/"+currentLanguage.i18n+".js"; + + if (isGuideMod) //图鉴模式直接打开搜索框 + showSearch([]); } //编辑界面点击每个怪物的头像的处理 function clickMonHead(e) diff --git a/style.css b/style.css index 5d318c81..0f500aab 100644 --- a/style.css +++ b/style.css @@ -681,6 +681,10 @@ ul{ filter:blur(5px); pointer-events: none; } +.guide-mod .blur-bg{ + filter: unset; +} + .edit-box{ background-color: rgba(82, 53, 30, 0.8); color: white; @@ -691,6 +695,9 @@ ul{ box-sizing: border-box; min-width:664px; } +.guide-mod .edit-box{ + background-color: rgb(102, 73, 50); +} .edit-box-title{ text-align: center; font-size: 2em;