I hereby claim:
- I am danielmendel on github.
- I am desp (https://keybase.io/desp) on keybase.
- I have a public key ASBa6vwYa3n3Hp5k5gw0XkB8mki194rQyFiso26aB3rLUgo
To claim this, I am signing this object:
Array.from(document.querySelectorAll('img[alt]:not([alt=""])')).forEach($el => { | |
const $div = document.createElement('div'); | |
$div.style.display = 'inline-block'; | |
const {width, height} = $el.getBoundingClientRect(); | |
$div.style.width = width; | |
$div.style.height = height; | |
$div.innerText = $el.getAttribute('alt'); | |
$el.parentNode.replaceChild($div, $el); | |
}); |
I hereby claim:
To claim this, I am signing this object:
!function(namespace) { | |
// normalize requestAnimationFrame across user agents | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
} | |
// capture first paint | |
if(window.requestAnimationFrame) | |
requestAnimationFrame(function(){ | |
namespace.firstAnimationFrameFired = new Date().getTime(); |
var s = document.createElement('script'); | |
s.src = preload[1]; | |
s.type = "text/cache"; | |
document.getElementsByTagName('head')[0].appendChild(s); |