F7_Office/usr/share/coolwsd/browser/dist/wasm.html
F7 Office Deploy d6a3131297 F7 Office: кастомизация брендинга, конфиги coolwsd и Apache
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-16 16:53:12 +00:00

51 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<title>Online</title>
<style>
html,
body,
iframe {
margin: 0px;
padding: 0px;
border: none;
}
</style>
</head>
<body>
<form id="form" action enctype="multipart/form-data" target="coolframe" method="post">
<input name="access_token" value="test" type="hidden" />
</form>
<iframe id="coolframe" name="coolframe" style="width:100%;height:100%;position:absolute;" title="F7 Office">
</iframe>
<script>
function constructWopiUrl() {
var localServer = window.location.protocol + "//" + window.location.host;
var localUrl = localServer + window.location.pathname + "?";
localUrl = localUrl.replace("/wasm.html", "/wasm/cool.html");
var params = new URLSearchParams(window.location.search);
var wopiSrc = params.get('WOPISrc');
if (wopiSrc) {
params.delete('WOPISrc');
}
else {
var filePath = params.get('file_path').substr(1);
params.delete('file_path');
wopiSrc = localServer + "/wopi/files/" + filePath;
}
return localUrl + params.toString() + (params.size === 0 ? '' : '&') + "WOPISrc="
+ encodeURIComponent(wopiSrc);
}
var form = document.getElementById("form");
form.action = constructWopiUrl();
form.submit();
</script>
</body>
</html>