Skip to content

Instantly share code, notes, and snippets.

@williamho
Created December 1, 2015 03:26
Show Gist options
  • Select an option

  • Save williamho/5dedc9720eaedf197eca to your computer and use it in GitHub Desktop.

Select an option

Save williamho/5dedc9720eaedf197eca to your computer and use it in GitHub Desktop.
(function() {
var d = document;
var img = d.createElement('img');
img.style.cssText = 'right:0; top:0; position:fixed;';
d.body.appendChild(img);
var elems = d.querySelectorAll('a[href^="./"]');
Array.prototype.forEach.call(elems, function(elem) {
elem.addEventListener('mouseover', function() {
if (elem.href) { img.src = elem.href; } // ???
})
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment