diff --git a/html/image_galleries.html b/html/image_galleries.html index 2af3880..26f38b3 100644 --- a/html/image_galleries.html +++ b/html/image_galleries.html @@ -21,11 +21,15 @@ padding: 10px; } - #loaded_counter_row { + th, td { + text-align: center; + } + + .loaded_counter_col { color: Green; } - #failed_counter_row { + .failed_counter_col { color: Red; } @@ -53,6 +57,8 @@ const default_blur_radius = 16; // 16px + const statistics_help = 'L - Loaded\nF - Failed\nT - Total\nLR - Loaded Rate\n\nG - Gallery\nA - All'; + if (is_mobile()) { var current_blur_radius = 16; } @@ -108,6 +114,8 @@ function handle_loaded_image(img_num, search_option) { document.images[img_num].style.border = '1px solid Black'; get_image_size(img_num); + document.getElementById('output').getElementsByTagName('p')[img_num].getElementsByTagName('br')[0].hidden = false; + document.getElementById('output').getElementsByTagName('p')[img_num].getElementsByTagName('br')[1].hidden = false; document.getElementsByClassName('open_image_button')[img_num].hidden = false; document.getElementsByClassName('copy_image_url_button')[img_num].hidden = false; @@ -122,11 +130,13 @@ function search_image(img_url, search_engine) { if (search_engine == 'google') { - window.open(`https://lens.google.com/uploadbyurl?url=${img_url}`, '_blank'); + var search_url = `https://lens.google.com/uploadbyurl?url=${img_url}`; } else if (search_engine == 'yandex') { - window.open(`https://ya.ru/images/search?rpt=imageview&url=${img_url}`, '_blank'); + var search_url = `https://ya.ru/images/search?rpt=imageview&url=${img_url}`; } + + window.open(search_url, '_blank'); } function blur_image(image, radius) { @@ -155,6 +165,29 @@ } } + function update_loaded_rate_color() { + // Gallery + if (loaded_rate_gallery.innerText == '100') { + loaded_rate_gallery.parentNode.style.color = 'Green'; + } + else if (loaded_rate_gallery.innerText == '0') { + loaded_rate_gallery.parentNode.style.color = 'Red'; + } + + // All + if (loaded_rate_all.innerText == '100') { + loaded_rate_all.parentNode.style.color = 'Green'; + } + else if (loaded_rate_all.innerText == '0') { + loaded_rate_all.parentNode.style.color = 'Red'; + } + } + + function reset_loaded_rate_color() { + loaded_rate_gallery.parentNode.style.color = 'Black'; + loaded_rate_all.parentNode.style.color = 'Black'; + } + function load_gallery() { if (document.getElementById('base_link').value != '' && document.getElementById('images_amount').value != '' && is_any_radio_checked('file_format')) { var image_id = ''; @@ -234,9 +267,12 @@ var loaded_rate_all = document.getElementById('loaded_rate_all'); var galleries_counter = document.getElementById('galleries_counter'); + var average_counter = document.getElementById('average_counter'); total_counter_gallery.innerText = images_amount; total_counter_all.innerText = parseInt(total_counter_all.innerText, 10) + parseInt(total_counter_gallery.innerText, 10); + + reset_loaded_rate_color(); } clear_output(); @@ -247,9 +283,10 @@ image_item = `
-
-
+
+
+
- | Gallery | -All | -|||||
---|---|---|---|---|---|---|---|
Loaded | -0 | -0 | -|||||
Failed | -0 | -0 | ++ | L | +F | +T | +LR |
Total | +G | +0 | +0 | 0 | -0 | +0% | |
Loaded rate | -0% | +A | +0 | +0 | +0 | 0% |
Galleries loaded: 0
+Average images per gallery: 0
++ + +