-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmiencraft-smelting-recipe.html
104 lines (100 loc) · 4.83 KB
/
miencraft-smelting-recipe.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="image/icontestHtml.png">
<title>hrmc.ngs.computer</title>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=noto+sans+jp&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=noto+sans+jp:wght@700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<!-- <div class="link">
<a id="twitterLink" href="https://x.com/0526ngs" target="_blank">
<img src="image/iconTwitterhrmcngsHtml.png" alt="Twitter Link Image" width="100">
</a>
<a id="twitterLink" href="https://Instagram.com/0526ngs" target="_blank">
<img src="image/iconInstagramhrmcngsHtml.png" alt="Instagram Link Image" width="100">
</a>
<a id="twitterLink" href="https://github.com/hrmcngs" target="_blank">
<img src="image/iconGithubhrmcngsHtml.png" alt="Github Link Image" width="100">
</a>
<a id="twitterLink" href="https://x.com/RenkonUmauma65" target="_blank">
<img src="image/iconTwitterrenkonHtml.png" alt="Twitter Link Image" width="100">
</a>
<a id="twitterLink" href="https://github.com/Renkon65" target="_blank">
<img src="image/iconGithubrenkonHtml.png" alt="github Link Image" width="100">
</a>
</div> -->
<div class="global-nav">
<ul>
<li><a class="button" href="index.html">home</a></li>
<li><a class="button" href="rotation.html">回転</a></li>
<li><a class="button" href="pythagorean-theorem.html">三平方の定理</a></li>
<li><a class="button" href="canvas-arc.html">円弧</a></li>
<li><a class="button" href="3dgraphics.html">3D図形</a></li>
</ul>
</div>
</nav>
</header>
<div class="smelting_main">
<h2>マイクラ | 精錬 レシピ生成</h2>
<input type="text" id="id-block-or-item-0" placeholder="元のアイテム">
<input type="text" id="id-block-or-item-1" placeholder="アイテムのタグ">
<input type="text" id="id-block-or-item-2" placeholder="精錬後のアイテム">
<button id="submitButton">了承</button>
<button id="copyButton">コピー</button>
<pre id="log">Existing text</pre>
<script>
document.getElementById('submitButton').addEventListener('click', function() {
// JSONオブジェクトのテンプレート
var jsonTemplate = {
"type": "minecraft:smithing",
"base": {
"item": "id-block-or-item-0"
},
"addition": {
"tag": "id-block-or-item-1"
},
"result": {
"item": "id-block-or-item-2"
}
};
// テキストフィールドの値を取得してJSONオブジェクトに追加
var inputText0 = document.getElementById('id-block-or-item-0').value;
var inputText1 = document.getElementById('id-block-or-item-1').value;
var inputText2 = document.getElementById('id-block-or-item-2').value;
jsonTemplate.base.item = inputText0;
jsonTemplate.addition.tag = inputText1;
jsonTemplate.result.item = inputText2;
// JSONオブジェクトを整形して表示
document.getElementById('log').textContent = JSON.stringify(jsonTemplate, null, 2);
});
// コピー機能を追加
document.getElementById('copyButton').addEventListener('click', function() {
var resultText = document.getElementById('log').textContent;
var textArea = document.createElement("textarea");
textArea.value = resultText;
document.body.appendChild(textArea);
textArea.select();
document.execCommand('copy');
document.body.removeChild(textArea);
alert('Copied to clipboard');
});
</script>
</div>
<div class="omake">
<h2>おまけ</h2>
<ul>
<li><a class="button" href="miencraft-blasting-smoking-campfire-cooking-recipe.html">blasting-smoking-campfire-cooking</a></li>
<li><a class="button" href="miencraft-crafting-recipe.html">minecraft-crafting-recipe</a></li>
<li><a class="button" href="miencraft-smelting-recipe.html">minecraft-smelting-recipe</a></li>
</ul>
</div>
<footer><small>2024年9月4日現在最新版</small></footer>
</body>
</html>