Fix #38: Add a loading message with progress on end-user interface

This commit is contained in:
Benjamin_Loison committed 2023-02-14 01:08:05 +01:00
1 parent 34c0d03587
commit 4449d488c9
3 files changed
+17 -17

No files matched your search

+4 -2
View File
@@ -17,6 +17,8 @@ Access raw data with: <?php echoUrl('channels/'); ?>.
<input type="submit" id="search-only-captions" value="Search only captions">
</form>
Progress: <span id="progress"></span>
<ul id="channels">
</ul>
@@ -36,8 +38,8 @@ Access raw data with: <?php echoUrl('channels/'); ?>.
function treatLine(line) {
console.log(line);
if (line.startsWith('alert:')) {
alert(line.replace('alert:', ''));
if (line.startsWith('progress:')) {
document.getElementById('progress').innerHTML = line.replace('progress:', '');
} else {
var channelsDom = document.getElementById('channels');
const channelFileParts = line.split('/');