错误代码恢复

This commit is contained in:
枫谷剑仙 2021-10-08 00:11:41 +08:00
parent d8d998e698
commit e3e4b47e5f
4 changed files with 37 additions and 14 deletions

27
.gitignore vendored
View File

@ -1,13 +1,14 @@
/monsters-info/Download-pad.skyozora.com
/monsters-info/opencc
/monsters-info/node_modules
*formatting.json
/monsters-info/official-API/*-dungeon.json
/monsters-info/official-API/*-enemy_skill.json
/monsters-info/official-API/*-limited_bonus.json
/monsters-info/official-API/*-mdatadl.json
/monsters-info/official-API/*-shop_item.json
/sound/voice/variables.txt
/fonts/.font-spider
/images/*.fw.png
/monsters-info/package-lock.json
/monsters-info/Download-pad.skyozora.com
/monsters-info/opencc
/monsters-info/node_modules
*formatting.json
/monsters-info/official-API/*-dungeon.json
/monsters-info/official-API/*-player-data*.json
/monsters-info/official-API/*-enemy_skill.json
/monsters-info/official-API/*-limited_bonus.json
/monsters-info/official-API/*-mdatadl.json
/monsters-info/official-API/*-shop_item.json
/sound/voice/variables.txt
/fonts/.font-spider
/images/*.fw.png
/monsters-info/package-lock.json

8
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true,
"deno.suggest.imports.hosts": {
"https://deno.land": false
}
}

View File

@ -155,7 +155,7 @@ function tp(strings, ...keys) {
//console.debug("模板字符串中 %s 未找到输入数据",key);
}else
{
if (!(value instanceof HTMLElement))
if (!(value instanceof Node)) //这里需要用 Node 而不是 HTMLElement因为 DocumentFragment 从属于 Node
{
value = document.createTextNode(value);
}

14
update-service-worker.ts Normal file
View File

@ -0,0 +1,14 @@
//import { basename } from "https://deno.land/std/path/mod.ts";
import { createHash } from "https://deno.land/std/hash/mod.ts";
let dirName = "images/cards_ja";
for await (const dirEntry of Deno.readDir(dirName)) {
if (dirEntry.isFile) {
const fileName = `${dirName}/${dirEntry.name}`;
const hash = createHash("md5");
const file = await Deno.readFile(fileName);
hash.update(file);
const hashInHex = hash.toString(); // returns 5fe084ee423ff7e0c7709e9437cee89d
console.log(hashInHex);
}
}