Last active
September 5, 2018 19:59
-
-
Save flesler/45cc259aea64273cb78f125a3ada9eda to your computer and use it in GitHub Desktop.
Y esto hizo subir el dolar | https://gistpreview.github.io/?45cc259aea64273cb78f125a3ada9eda/bookmarklet.html
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
<p>Arrastrar el link a la barra de favoritos y clickearlo viendo la pagina de algun diario online</p> | |
<a href="javascript:(function(tags,ignore,suffix){function arr(nodes){return[].slice.call(nodes)} | |
tags.forEach(function(tag,i){arr(document.getElementsByTagName(tag)).forEach(function(node){var prev=arr(node.parentNode.childNodes).filter(function(other){return tags.indexOf(other.nodeName)!==-1&&tags.indexOf(other.nodeName)<i});if(prev.length){return} | |
node.style.overflow='visible';node.style.height='auto';if(node.innerHTML.indexOf(suffix)===-1&&!ignore.test(node.innerHTML)){node=node.getElementsByTagName('a')[0]||node;node.appendChild(document.createTextNode(suffix))}})})})(['H2','H3'],/d.lar/i,' y esto hizo subir el dolar')">Diario</a> |
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: (function(tags, ignore, suffix) { | |
function arr(nodes) { | |
return [].slice.call(nodes) | |
} | |
tags.forEach(function(tag, i) { | |
arr(document.getElementsByTagName(tag)).forEach(function(node) { | |
var prev = arr(node.parentNode.childNodes).filter(function(other) { | |
return tags.indexOf(other.nodeName) !== -1 && tags.indexOf(other.nodeName) < i | |
}); | |
if (prev.length) { | |
return | |
} | |
node.style.overflow = 'visible'; | |
node.style.height = 'auto'; | |
if (node.innerHTML.indexOf(suffix) === -1 && !ignore.test(node.innerHTML)) { | |
node = node.getElementsByTagName('a')[0] || node; | |
node.appendChild(document.createTextNode(suffix)); | |
} | |
}) | |
}) | |
})(['H2', 'H3'], /d.lar/i, ' y esto hizo subir el dolar') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment