diff --git a/monsters-info/extractByNode.js b/monsters-info/extractByNode.js index 621a60c4..5e6452cc 100644 --- a/monsters-info/extractByNode.js +++ b/monsters-info/extractByNode.js @@ -36,7 +36,7 @@ for (var mi=0;mi0?(m[awokenCIdx+1+m[awokenCIdx]].split(",").map(function(ns){return parseInt(ns);})):null; //超觉醒 var mon = { id: m[0], diff --git a/script.js b/script.js index f0104f8e..0c702f63 100644 --- a/script.js +++ b/script.js @@ -328,6 +328,15 @@ function initialize() creatNewUrl(); editBox.hide(); } + window.onkeydown = function(e){ + if (!editBox.classList.contains("display-none")) + { + if (e.keyCode == 27) + { //按下ESC时,自动关闭编辑窗 + btnCancel.onclick(); + } + } + } btnNull.onclick = function(){ var mD = formation.team[editBox.memberIdx[0]][editBox.memberIdx[1]][editBox.memberIdx[2]] = {id:0}; changeid(mD,editBox.monsterBox,editBox.latentBox); @@ -445,7 +454,7 @@ function changeid(mon,monDom,latentDom) } } var m_id = monDom.querySelector(".id"); - if (m_id) //如果存在超觉醒的DOM且提供了超觉醒 + if (m_id) //怪物ID { m_id.innerHTML = mon.id; } @@ -607,7 +616,7 @@ function editBoxChangeMonId(id) //超觉醒 var mSAwokenRow = settingBox.querySelector(".row-mon-super-awoken"); var mSAwoken = mSAwokenRow.querySelectorAll(".awoken-ul li"); - if (md.sAwoken) + if (md.sAwoken && md.sAwoken.length>0) { mSAwokenRow.classList.remove("display-none"); for (var ai=0;ai