mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: update mitm config
This commit is contained in:
1 parent
229869bc5c
commit
758987f3fa
2 files changed
+6
-6
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.7.4",
|
"version": "4.7.5",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ import tpl from 'vj/utils/tpl';
|
|||||||
import delay from 'vj/utils/delay';
|
import delay from 'vj/utils/delay';
|
||||||
import i18n from 'vj/utils/i18n';
|
import i18n from 'vj/utils/i18n';
|
||||||
|
|
||||||
try {
|
// Firefox have no WritableStream
|
||||||
// Firefox have no WritableStream
|
if (!window.WritableStream) streamsaver.WritableStream = WritableStream;
|
||||||
if (!window.WritableStream) streamsaver.WritableStream = WritableStream;
|
if (window.location.protocol === 'https:'
|
||||||
|
|| window.location.protocol === 'chrome-extension:'
|
||||||
|
|| window.location.hostname === 'localhost') {
|
||||||
streamsaver.mitm = '/streamsaver/mitm.html';
|
streamsaver.mitm = '/streamsaver/mitm.html';
|
||||||
} catch (e) {
|
|
||||||
// Extending not allowed in snowpack
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadProblemFilesAsArchive(type, files) {
|
async function downloadProblemFilesAsArchive(type, files) {
|
||||||
|
|||||||
Reference in new issue
Block a user