Fixed loop variable being used twice
This commit is contained in:
parent
a1511a2e3d
commit
9e66a083ea
@ -62,9 +62,9 @@ function getEmails() {
|
||||
var rex = /.*?<a[^>]*href=["'](https?:\/\/[^"']+)["'][^>]*>(.*?)<\/a>.*?/gi
|
||||
while(u = rex.exec(threads[i].getMessages()[0].getBody())){
|
||||
if(u[0].toLowerCase().indexOf('unsubscribe')!==-1){
|
||||
for(var i = u.length-1; i >=0; i--){
|
||||
if(u[i].substring(0,4)=="http"){
|
||||
d.uns=u[i]
|
||||
for(var j = u.length-1; j >=0; j--){
|
||||
if(u[j].substring(0,4)=="http"){
|
||||
d.uns=u[j]
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -74,9 +74,6 @@ function getEmails() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(d.uns === null){
|
||||
Logger.log(d.subject)
|
||||
}
|
||||
data.push(d)
|
||||
} else {
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user