doc support: .doc auto-converts via Word COM (PowerShell, temp cleaned); no Word -> clear resave hint; UI accepts .doc

This commit is contained in:
Sadmin committed 2026-11-10 15:20:18 +03:00
1 parent 80d457b39f
commit 15c5ef89de
5 files changed
+119 -8

No files matched your search

+4 -4
View File
@@ -43,8 +43,8 @@ details.pgroup > summary:hover { background:#f6f8fa; }
<div class="wrap">
<h1>Проверка документов — орфография и пунктуация</h1>
<div class="panel" id="drop">
Перетащите файл сюда или нажмите — <b>.docx</b>, <b>.xlsx</b>, <b>.pptx</b> или <b>.txt</b> (старый .doc пересохраните в .docx)
<input type="file" id="file" accept=".docx,.xlsx,.pptx,.txt" style="display:none">
Перетащите файл сюда или нажмите — <b>.docx</b>, <b>.xlsx</b>, <b>.pptx</b> или <b>.txt</b>; старый <b>.doc</b> конвертируется сам (нужен установленный Word)
<input type="file" id="file" accept=".doc,.docx,.xlsx,.pptx,.txt" style="display:none">
<div id="fileinfo"></div>
</div>
<div class="panel" id="controls">
@@ -95,10 +95,10 @@ function dragEvents() {
$("file").onchange = (e) => setFile(e.target.files[0]);
function setFile(f) {
if (!f) return;
const ok = /\.(docx|xlsx|pptx|txt)$/i.test(f.name);
const ok = /\.(doc|docx|xlsx|pptx|txt)$/i.test(f.name);
file = ok ? f : null;
$("fileinfo").textContent = ok ? f.name + " — " + (f.size/1024/1024).toFixed(2) + " МБ"
: "Формат не поддержан: нужен .docx, .xlsx, .pptx или .txt (.doc пересохраните)";
: "Формат не поддержан: нужен .doc, .docx, .xlsx, .pptx или .txt";
$("go").disabled = !file;
}