Spaces:
Running
Running
Update index.html
Browse files- index.html +7 -1
index.html
CHANGED
@@ -22,9 +22,15 @@
|
|
22 |
if (!response.ok) throw new Error(`HTTPエラー: ${response.status}`);
|
23 |
const blob = await response.blob();
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
// ファイル保存ダイアログを表示
|
26 |
const handle = await window.showSaveFilePicker({
|
27 |
-
suggestedName:
|
28 |
types: [
|
29 |
{
|
30 |
description: 'All Files',
|
|
|
22 |
if (!response.ok) throw new Error(`HTTPエラー: ${response.status}`);
|
23 |
const blob = await response.blob();
|
24 |
|
25 |
+
// ファイル名を補正
|
26 |
+
let suggestedName = link.download || 'downloaded-file';
|
27 |
+
if (suggestedName.endsWith('.')) {
|
28 |
+
suggestedName += 'html'; // 拡張子が "." の場合に "html" を追加
|
29 |
+
}
|
30 |
+
|
31 |
// ファイル保存ダイアログを表示
|
32 |
const handle = await window.showSaveFilePicker({
|
33 |
+
suggestedName: suggestedName,
|
34 |
types: [
|
35 |
{
|
36 |
description: 'All Files',
|