Fix #38: Add a loading message with progress on end-user interface
This commit is contained in:
@@ -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('/');
|
||||
|
Reference in New Issue
Block a user