Last active
July 23, 2020 04:57
-
-
Save gusdleon/0e43fa883542cf59c993ac4659aa6a0e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
by Gustavo de León @gusdleon | |
This code is in the public domain. | |
*/ | |
var Texto = Twitter.newTweetByUser.Text; //Guardando el contenido del Tweet | |
var mag = 6.0; //Magnitud minima de sismo que activará la notificacion | |
while(mag >= 1 && mag <= 11 ){ | |
if(Texto.indexOf(("Magnitud "+ mag) ) >=0 ){ | |
mag = parseFloat((mag + 0.1).toFixed(1)); | |
break; | |
}else{ | |
if(mag >=10){ | |
IfNotifications.sendNotification.skip(); | |
break; | |
} | |
mag = parseFloat((mag + 0.1).toFixed(1)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment