Last active
May 28, 2018 19:37
-
-
Save vivirenremoto/fa5dec33846c87ca5e29e8bcd9689a5c 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
javascript: var search='dominio.com'; var items=document.getElementsByClassName('g'); var position=0; var found=false; var texto; var i=0; var total=items.length; while(!found && i<total){ texto=items[i].innerText; if( items[i].tagName == 'DIV' && !items[i].id ){ position++; if( texto.indexOf(search) > -1 ){ found = position+'- '+texto; };};i++;}; if(!found){ found='No se ha encontrado' }; alert(found); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment