| @@ -125,9 +125,9 @@ | ||
| 125 | 125 | .then(response => { |
| 126 | 126 | if (!response.ok) { |
| 127 | 127 | // The server returned a 4xx or 5xx, read the text and throw an error |
| 128 | 128 | return response.text().then(html => { |
| 129 | - console.error('Server error:\n' + html); | |
| 129 | + // console.error('Server error:\n' + html); | |
| 130 | 130 | throw new Error('Server error (not JSON).'); |
| 131 | 131 | }); |
| 132 | 132 | } |
| 133 | 133 | // If ok, parse JSON |
| @@ -134,9 +134,9 @@ | ||
| 134 | 134 | return response.json(); |
| 135 | 135 | }) |
| 136 | 136 | .then(data => { |
| 137 | 137 | if (!data.success) { |
| 138 | - console.error('API error:', data); | |
| 138 | + // console.error('API error:', data); | |
| 139 | 139 | } |
| 140 | 140 | if (data.success) { |
| 141 | 141 | $('#template-installing-popup').fadeIn(); |
| 142 | 142 | doImport(data); |
| @@ -144,9 +144,9 @@ | ||
| 144 | 144 | $('#premium-promo-popup').fadeIn(); |
| 145 | 145 | } |
| 146 | 146 | }) |
| 147 | 147 | .catch(error => { |
| 148 | - console.error('Fetch error:', error); | |
| 148 | + // console.error('Fetch error:', error); | |
| 149 | 149 | alert('Connection error: ' + error); |
| 150 | 150 | }); |
| 151 | 151 | }); |
| 152 | 152 | |
| @@ -184,9 +184,9 @@ | ||
| 184 | 184 | .then(response => { |
| 185 | 185 | if (!response.ok) { |
| 186 | 186 | // The server returned a 4xx or 5xx, read the text and throw an error |
| 187 | 187 | return response.text().then(html => { |
| 188 | - console.error('Server error:\n' + html); | |
| 188 | + // console.error('Server error:\n' + html); | |
| 189 | 189 | throw new Error('Server error:\n' + html); |
| 190 | 190 | }); |
| 191 | 191 | } |
| 192 | 192 | // If ok, parse JSON |
| @@ -220,9 +220,9 @@ | ||
| 220 | 220 | .then(response => { |
| 221 | 221 | if (!response.ok) { |
| 222 | 222 | // The server returned a 4xx or 5xx, read the text and throw an error |
| 223 | 223 | return response.text().then(html => { |
| 224 | - console.error('Server error:\n' + html); | |
| 224 | + // console.error('Server error:\n' + html); | |
| 225 | 225 | throw new Error('Server error:\n' + html); |
| 226 | 226 | }); |
| 227 | 227 | } |
| 228 | 228 | // If ok, parse JSON |
| @@ -257,9 +257,9 @@ | ||
| 257 | 257 | goToPage.fadeIn(); |
| 258 | 258 | $('#close-installing-popup').fadeIn(); |
| 259 | 259 | } |
| 260 | 260 | } else { |
| 261 | - console.error('Process image issue:', data); | |
| 261 | + // console.error('Process image issue:', data); | |
| 262 | 262 | // Skip image |
| 263 | 263 | if (data.data && data.data.retry) { |
| 264 | 264 | processNextImage(); |
| 265 | 265 | } |
| @@ -265,9 +265,9 @@ | ||
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | }) |
| 268 | 268 | .catch(error => { |
| 269 | - console.error('Catch Error:', error); | |
| 269 | + // console.error('Catch Error:', error); | |
| 270 | 270 | if (currentRetry < maxRetries) { |
| 271 | 271 | currentRetry++; |
| 272 | 272 | retryTimeout *= 2; |
| 273 | 273 | setTimeout(attemptProcessImage, retryTimeout); |
| @@ -275,9 +275,9 @@ | ||
| 275 | 275 | let imageUrlElement = document.querySelector('li[data-url="unknown"]'); |
| 276 | 276 | if (imageUrlElement) { |
| 277 | 277 | imageUrlElement.innerHTML += ' - SKIPPED'; |
| 278 | 278 | } |
| 279 | - console.error('Error:', error); | |
| 279 | + // console.error('Error:', error); | |
| 280 | 280 | document.getElementById('final_response').innerText = 'Error: ' + error.message; |
| 281 | 281 | currentRetry = 0; |
| 282 | 282 | retryTimeout = 1000; |
| 283 | 283 | processNextImage(); |
| @@ -332,9 +332,9 @@ | ||
| 332 | 332 | alert('Error: ' + response.data); |
| 333 | 333 | } |
| 334 | 334 | }, |
| 335 | 335 | error: function (xhr, status, error) { |
| 336 | - console.error('AJAX Error: ', status, error); | |
| 336 | + // console.error('AJAX Error: ', status, error); | |
| 337 | 337 | } |
| 338 | 338 | }); |
| 339 | 339 | } |
| 340 | 340 | |
| @@ -496,9 +496,9 @@ | ||
| 496 | 496 | window.sectionsFilters = {}; |
| 497 | 497 | |
| 498 | 498 | function loadSections(page = 1) { |
| 499 | 499 | if (!window.kingAddonsData || !window.kingAddonsData.ajaxUrl) { |
| 500 | - console.error('King Addons data not available'); | |
| 500 | + // console.error('King Addons data not available'); | |
| 501 | 501 | return; |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | var searchQuery = $('#sections-search').val() || ''; |
| @@ -543,9 +543,9 @@ | ||
| 543 | 543 | `); |
| 544 | 544 | } |
| 545 | 545 | }, |
| 546 | 546 | error: function(xhr, status, error) { |
| 547 | - console.error('AJAX Error loading sections:', status, error); | |
| 547 | + // console.error('AJAX Error loading sections:', status, error); | |
| 548 | 548 | $('.sections-grid').html(` |
| 549 | 549 | <div class="sections-loading"> |
| 550 | 550 | Failed to load sections. Please try again. |
| 551 | 551 | </div> |
| @@ -985,9 +985,9 @@ | ||
| 985 | 985 | $('#sections-count').text(response.data.pagination.total_sections); |
| 986 | 986 | } |
| 987 | 987 | }, |
| 988 | 988 | error: function(xhr, status, error) { |
| 989 | - console.log('Failed to load sections count:', error); | |
| 989 | + // console.log('Failed to load sections count:', error); | |
| 990 | 990 | } |
| 991 | 991 | }); |
| 992 | 992 | } |
| 993 | 993 | |