Skip to content

Instantly share code, notes, and snippets.

View axelmichel's full-sized avatar

Axel Michel axelmichel

View GitHub Profile
axelmichel / durationtransitionprop.js
Created January 13, 2017 22:58
Extracting the transition with the longest duration (and delay)
View durationtransitionprop.js
function getMaxDurationTransitionProperty(el) {
// small helper to extract the values
function extract(str) {
return str
.replace(/[A-Z]/gi, "")
.split(", ")
// get the current style
var style = getComputedStyle(el);
axelmichel / blurry-example.html
Created February 1, 2016 10:12
facebook like unblur effect with tiny images onload and src switch after
View blurry-example.html
<img class="blurry" src="super-tinyimage-small.jpg" />
<div class="blurry" style="background-image:url(super-tinyimage-small.jpg);"></div>
View ios-viewport-scaling-bug-fix-original.js
// Original code from
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";