Skip to content

Commit 2cde2b7

Browse files
authored
Merge pull request #96 from mdesson/master
Fixed user email address not begin picked up
2 parents 1d971fe + 2aef03d commit 2cde2b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/script.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ Element.prototype.remove = function () {
3737
this.parentElement.removeChild(this);
3838
};
3939

40-
const getMyEmailAddress = () => document.querySelector('.gb_lb') ? document.querySelector('.gb_lb').innerText : '';
40+
const getMyEmailAddress = () => {
41+
if (document.querySelector('.gb_hb').innerText) return document.querySelector('.gb_hb').innerText;
42+
if (document.querySelector('.gb_lb').innerText) return document.querySelector('.gb_lb').innerText;
43+
if (document.querySelector('.gb_qb').innerText) return document.querySelector('.gb_qb').innerText;
44+
return '';
45+
}
4146

4247
const getEmailParticipants = function (email) {
4348
return email.querySelectorAll('.yW span[email]');

0 commit comments

Comments
 (0)