Add xlsx and pptx support: sheet cells, slide text and tables, speaker notes
This commit is contained in:
1 parent
2bb2dc82a1
commit
4ea34eba8d
7 files changed
+116
-10
No files matched your search
+4
-4
@@ -43,8 +43,8 @@ details.pgroup > summary:hover { background:#f6f8fa; }
|
||||
<div class="wrap">
|
||||
<h1>Проверка документов — орфография и пунктуация</h1>
|
||||
<div class="panel" id="drop">
|
||||
Перетащите файл сюда или нажмите — <b>.docx</b> или <b>.txt</b> (старый .doc пересохраните в .docx)
|
||||
<input type="file" id="file" accept=".docx,.txt" style="display:none">
|
||||
Перетащите файл сюда или нажмите — <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">
|
||||
<div id="fileinfo"></div>
|
||||
</div>
|
||||
<div class="panel" id="controls">
|
||||
@@ -94,10 +94,10 @@ function dragEvents() {
|
||||
$("file").onchange = (e) => setFile(e.target.files[0]);
|
||||
function setFile(f) {
|
||||
if (!f) return;
|
||||
const ok = /\.(docx|txt)$/i.test(f.name);
|
||||
const ok = /\.(docx|xlsx|pptx|txt)$/i.test(f.name);
|
||||
file = ok ? f : null;
|
||||
$("fileinfo").textContent = ok ? f.name + " — " + (f.size/1024/1024).toFixed(2) + " МБ"
|
||||
: "Формат не поддержан: нужен .docx или .txt (.doc пересохраните)";
|
||||
: "Формат не поддержан: нужен .docx, .xlsx, .pptx или .txt (.doc пересохраните)";
|
||||
$("go").disabled = !file;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user