Skip to content

Instantly share code, notes, and snippets.

@flesler
Last active September 5, 2018 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flesler/45cc259aea64273cb78f125a3ada9eda to your computer and use it in GitHub Desktop.
Save flesler/45cc259aea64273cb78f125a3ada9eda to your computer and use it in GitHub Desktop.
<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>
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