mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
vjudge: codeforces: fix image
This commit is contained in:
1 parent
1711babf56
commit
1102496b91
4 files changed
+11
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.28.45",
|
||||
"version": "2.28.46",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -415,6 +415,14 @@ const scripts: UpgradeScript[] = [
|
||||
}
|
||||
return true;
|
||||
},
|
||||
async function _33_34() {
|
||||
const _FRESH_INSTALL_IGNORE = 1;
|
||||
await iterateAllProblem(['content'], async (pdoc) => {
|
||||
if (typeof pdoc.content !== 'string') return;
|
||||
await problem.edit(pdoc.domainId, pdoc.docId, { content: pdoc.content.replace(/%file%:\/\//g, 'file://') });
|
||||
});
|
||||
return true;
|
||||
},
|
||||
];
|
||||
|
||||
export default scripts;
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/vjudge",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "Submit problems to remote oj",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
@@ -112,7 +112,7 @@ export default class CodeforcesProvider implements IBasicProvider {
|
||||
superagent.get(src).pipe(file);
|
||||
const fid = String.random(8);
|
||||
files[`${fid}.png`] = file;
|
||||
ele.setAttribute('src', `%file%://${fid}.png`);
|
||||
ele.setAttribute('src', `file://${fid}.png`);
|
||||
});
|
||||
const title = document.querySelector('.title').innerHTML.trim().split('. ')[1];
|
||||
const time = parseInt(document.querySelector('.time-limit').innerHTML.substr(53, 2), 10);
|
||||
|
||||
Reference in new issue
Block a user