Skip to content
Snippets Groups Projects

Logging errors

Merged Thomas Neumann requested to merge tneumann9/UNL_Search:logging-errors into master
All threads resolved!
Files
9
+ 18
0
@@ -180,6 +180,24 @@ define(['jquery', 'analytics'], function ($, analytics) {
$('img.gcsc-branding-img-noclear', $root).attr('alt', 'Google™');
setTimeout(function() {
if ($('.gsc-table-result', $root).length == 0 && $('.gs-no-results-result', $root).length == 0 && $('#recaptcha-wrapper', $root).length == 0) {
var data = new FormData();
data.set("error", "Failed To Load");
fetch("/failCount.php", {
method: "POST",
body: data
});
$($root).html('<p>We are having issues connecting to Google, please try again later.</p>');
}
if ($('#recaptcha-wrapper', $root).length > 0){
var data = new FormData();
data.set("error", "Recaptcha");
fetch("/failCount.php", {
method: "POST",
body: data
});
}
if (!searchToggleLock && localGoogleSearch && control == localGoogleSearch.control && $('.gs-no-results-result', $root).length) {
var allUNLTab = document.getElementsByClassName('all-unl-tab')[0];
if (allUNLTab) {
Loading