catch exceptions when trying to resolve element by id
This commit is contained in:
parent
622b337ee2
commit
d6750cfd61
|
@ -1,4 +1,7 @@
|
|||
!(function () {
|
||||
// THIS FILE IS NOT CURRENTLY IN USE
|
||||
// IT IS NOT LOADED IN THE MANIFEST
|
||||
|
||||
!(function () {
|
||||
var icons = [],
|
||||
setIconsIntervalId = null,
|
||||
setIconsIntervalRunCount = 0,
|
||||
|
|
|
@ -72,7 +72,10 @@
|
|||
inputs = document.getElementsByTagName('input');
|
||||
|
||||
if (passwordId && passwordId !== '') {
|
||||
formDataObj.passwordEl = formDataObj.formEl.querySelector('#' + passwordId);
|
||||
try {
|
||||
formDataObj.passwordEl = formDataObj.formEl.querySelector('#' + passwordId);
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
if (!formDataObj.passwordEl && passwordName !== '') {
|
||||
formDataObj.passwordEl = formDataObj.formEl.querySelector('input[name="' + passwordName + '"]');
|
||||
|
@ -88,7 +91,10 @@
|
|||
}
|
||||
|
||||
if (usernameId && usernameId !== '') {
|
||||
formDataObj.usernameEl = formDataObj.formEl.querySelector('#' + usernameId);
|
||||
try {
|
||||
formDataObj.usernameEl = formDataObj.formEl.querySelector('#' + usernameId);
|
||||
}
|
||||
catch (e) { }
|
||||
}
|
||||
if (!formDataObj.usernameEl && usernameName !== '') {
|
||||
formDataObj.usernameEl = formDataObj.formEl.querySelector('input[name="' + usernameName + '"]');
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
!(function () {
|
||||
// THIS FILE IS NOT CURRENTLY IN USE
|
||||
// IT IS NOT LOADED IN THE MANIFEST
|
||||
|
||||
!(function () {
|
||||
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) {
|
||||
if (msg.command === 'openOverlayPopup') {
|
||||
closePopup();
|
||||
|
|
Loading…
Reference in New Issue