When clicking "Log-in" a "running" type series of tiny circles flash sequentially for ~ .5 seconds between the password entry field and "Keep me logged in", but nothing progresses. Attempting to Log-in using the "One-Time Code" path requires clicking "Click here if you’re not automatically redirected." but it also fails, and using "Open in another tab" results in circling back to the email entry field. This has been the result for quite a long time.
I apologize if the below copied code is not what is needed, and/or is way too much, but I am not sure what is relevant, though the CONSOLE'S single line certainty sounds so.
Would a Use agent modification solve this?
Thanks all for helping me to support Big Pharma!
Code: Select all
CONSOLE:
unreachable code after return statement[Learn More] vUxcwSmw:1:211135
----------------------------------
DEBUGGER: signin.js
$(document).ready(function () {
//move otp button inline with login button to maintain proper focus flow
$('#OTPExchange').insertBefore('#next')
//adjustments for ADA
$('h1').removeAttr('role');
//update tab order
$('input').attr('tabindex', '1');
$('a').attr('tabindex', '2');
$('button').attr('tabindex', '2');
// Fix 'enter' on input field triggering OTP flow
['#signInName', '#password'].forEach(id => {
document.querySelector(id).addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
event.preventDefault();
document.querySelector('#next').click();
}
});
})
const inputList = document.querySelectorAll('.error.itemLevel + input');
for (let i = 0; i < inputList.length; i++) {
$('input[id="' + inputList[i].id + '"]').attr('aria-describedby', inputList[i].id + 'Error')
if (inputList[i].id === 'password') {
$('.password-label + .error').attr('id', inputList[i].id + 'Error');
}
else {
if ($('label[for="' + inputList[i].id + '"] + .error')[0]) {
$('label[for="' + inputList[i].id + '"] + .error').attr('id', inputList[i].id + 'Error');
}
}
}
// Options for the observer (which mutations to observe)
const config = {
attributes: true,
childList: true,
subtree: true,
attributeFilter: ['aria-hidden']
};
// Callback function to execute when mutations are observed
// Update aria-label of error messages when errors are displayed
const callback = (mutationList, observer) => {
for (const mutation of mutationList) {
if (mutation.type == 'attributes' && mutation.target.className.toLowerCase().includes('error')) {
const errorList = document.querySelectorAll('.error.itemLevel');
for (let i = 0; i < errorList.length; i++) {
if (errorList[i].ariaHidden === 'false') {
errorList[i].ariaLabel = "Error: " + errorList[i].textContent.trim();
}
else {
errorList[i].removeAttribute('aria-label');
}
}
}
}
};
// Create an observer instance linked to the callback function
--------------------------------
ERRORS.JS
$(document).ready(function () {
//move otp button inline with login button to maintain proper focus flow
$('#OTPExchange').insertBefore('#next')
//adjustments for ADA
$('h1').removeAttr('role');
//update tab order
$('input').attr('tabindex', '1');
$('a').attr('tabindex', '2');
$('button').attr('tabindex', '2');
// Fix 'enter' on input field triggering OTP flow
['#signInName', '#password'].forEach(id => {
document.querySelector(id).addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
event.preventDefault();
document.querySelector('#next').click();
}
});
})
const inputList = document.querySelectorAll('.error.itemLevel + input');
for (let i = 0; i < inputList.length; i++) {
$('input[id="' + inputList[i].id + '"]').attr('aria-describedby', inputList[i].id + 'Error')
if (inputList[i].id === 'password') {
$('.password-label + .error').attr('id', inputList[i].id + 'Error');
}
else {
if ($('label[for="' + inputList[i].id + '"] + .error')[0]) {
$('label[for="' + inputList[i].id + '"] + .error').attr('id', inputList[i].id + 'Error');
}
}
}
// Options for the observer (which mutations to observe)
const config = {
attributes: true,
childList: true,
subtree: true,
attributeFilter: ['aria-hidden']
};
// Callback function to execute when mutations are observed
// Update aria-label of error messages when errors are displayed
const callback = (mutationList, observer) => {
for (const mutation of mutationList) {
if (mutation.type == 'attributes' && mutation.target.className.toLowerCase().includes('error')) {
const errorList = document.querySelectorAll('.error.itemLevel');
for (let i = 0; i < errorList.length; i++) {
if (errorList[i].ariaHidden === 'false') {
errorList[i].ariaLabel = "Error: " + errorList[i].textContent.trim();
}
else {
errorList[i].removeAttribute('aria-label');
}
}
}
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
const localFormNode = document.getElementById('api');
observer.observe(localFormNode, config);
});
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
const localFormNode = document.getElementById('api');
observer.observe(localFormNode, config);
});
-------------
$(document).ready(function () {
$('#next').on('click', function () { $('label').removeClass('validateLabel') });
$('#sendCode').on('click', function () { $('label').removeClass('validateLabel') });
let globalError = false;
// Options for the observer (which mutations to observe)
const config = {
attributes: true,
childList: true,
subtree: true
};
const setErrors = {
globalEmailState: function (target) {
if (['emailVerificationControl_error_message', 'OTPPhoneVerificationControl_error_message'].includes(target.id)) {
if (target.ariaHidden == 'false') {
const liList = document.querySelectorAll('li[aria-hidden=false');
if (liList) {
globalError = true;
$(liList[liList.length - 1].querySelector('label')).addClass('validateLabel');
$(liList[liList.length - 1].querySelector('input')).addClass('inputError');
}
} else {
globalError = false;
$('label').removeClass('validateLabel');
$('input').removeClass('inputError');
}
}
}
};
// Callback function to execute when mutations are observed
const callback = (mutationList, observerTest) => {
for (const mutation of mutationList) {
//specific classes used on one off pages
if (mutation.type == 'attributes' && document.getElementById('localAccountForm')) {
const inputList = document.querySelectorAll('input');
for (let i = 0; i < inputList.length; i++) {
if ($('input[id="' + inputList[i].id + '"]')[0] && $('input[id = "' + inputList[i].id + '"]')[0].className.includes('highlightError')) {
$('label[for="' + inputList[i].id + '"]').addClass('validateLabel');
$('input[id="' + inputList[i].id + '"]').addClass('invalid');
}
else {
$('label[for="' + inputList[i].id + '"]').removeClass('validateLabel');
$('input[id="' + inputList[i].id + '"]').removeClass('invalid');
}
}
}
// Set aria attributes
if ((mutation.type == 'attributes' && mutation.target.className.toLowerCase().includes('error')
|| (mutation.type === 'childList' && mutation.addedNodes[0]?.className?.includes('custom-error')))) {
const ERROR_PREFIX = 'Error: ';
let node = mutation.addedNodes[0] || mutation.target;
if (node.tagName.toLowerCase() != 'input' && mutation.attributeName != 'aria-label') {
if ([null, 'false'].includes(node.ariaHidden)) {
node.ariaLabel = ERROR_PREFIX + node.textContent.trim();
} else {
node.removeAttribute('aria-label');
}
}
}
//global errors
if (['emailVerificationControl_error_message', 'OTPPhoneVerificationControl_error_message'].includes(mutation.target.id)) {
setErrors.globalEmailState(mutation.target);
//error is displaying
//check which input box error is displaying for
//only change that specific input and don't clear it too early
} else if (mutation.type == 'childList' && mutation.target.className.toLowerCase().includes('error')) {
if (mutation.target.textContent) {
const inputList = document.querySelectorAll('.error.itemLevel + input');
for (let i = 0; i < inputList.length; i++) {
if ($('label[for="' + inputList[i].id + '"] + .error')[0] && $('label[for="' + inputList[i].id + '"] + .error')[0].ariaHidden == 'false') {
$('label[for="' + inputList[i].id + '"]').addClass('validateLabel');
$('input[id="' + inputList[i].id + '"]').addClass('invalid');
}
}
} else {
const inputList = document.querySelectorAll('.error.itemLevel + input');
if (!globalError) {
$('label[for="' + $(mutation.target).next()[0].id + '"]').removeClass('validateLabel');
$('input[id="' + $(mutation.target).next()[0].id + '"]').removeClass('invalid');
} else {
setErrors.globalEmailState(mutation.target);
}
}
}
}
};
// Create an observer instance linked to the callback function
const observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
const localFormNode = document.getElementById('api');
observer.observe(localFormNode, config);
});