Disable contextmenu and show download progress for compresesd files
This commit is contained in:
+4
-3
@@ -147,9 +147,6 @@ export function getQuestion(url, question_number, question_total) {
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
url: url,
|
url: url,
|
||||||
progress: function(e) {
|
progress: function(e) {
|
||||||
$("#progress").html(
|
|
||||||
`Downloading question [${question_number}/${question_total}]<br/>This file is compressed (no size available)`
|
|
||||||
);
|
|
||||||
if (e.lengthComputable) {
|
if (e.lengthComputable) {
|
||||||
var completedPercentage = Math.round((e.loaded * 100) / e.total);
|
var completedPercentage = Math.round((e.loaded * 100) / e.total);
|
||||||
|
|
||||||
@@ -158,6 +155,10 @@ export function getQuestion(url, question_number, question_total) {
|
|||||||
e.total
|
e.total
|
||||||
)}`
|
)}`
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
$("#progress").html(
|
||||||
|
`Downloading question [${question_number}/${question_total}]<br/>This file is compressed (downloaded ${helper.humanFileSize(e.loaded)})`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: (jqXHR, textStatus, errorThrown) => {
|
error: (jqXHR, textStatus, errorThrown) => {
|
||||||
|
|||||||
@@ -2695,6 +2695,10 @@ $(document).on("saveSessionEvent", {}, (evt, review) => {
|
|||||||
saveSession(review);
|
saveSession(review);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).contextmenu(() => {
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
|
||||||
// Helper to compare dates
|
// Helper to compare dates
|
||||||
function compareDates(d1, d2) {
|
function compareDates(d1, d2) {
|
||||||
console.log("compare", d1, d2);
|
console.log("compare", d1, d2);
|
||||||
|
|||||||
Reference in New Issue
Block a user