JSFiddle - React, Tailwind, and code Playground
by luka kupunia
JavaScript
var mobileDetect = !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i);
mobileDetect || function() {
var e, t, o, n, r = {
frameRate: 150,
animationTime: 400,
stepSize: 100,
pulseAlgorithm: !0,
pulseScale: 4,
pulseNormalize: 1,
accelerationDelta: 50,
accelerationMax: 3,
keyboardSupport: !0,
arrowScroll: 50,
fixedBackground: !0,
excluded: ""
},
a = r,
i = !1,
l = !1,
c = {
x: 0,
y: 0
},
s = !1,
u = document.documentElement,
d = [],
m = /^Mac/.test(navigator.platform),
f = {
left: 37,
up: 38,
right: 39,
down: 40,
spacebar: 32,
pageup: 33,
pagedown: 34,
end: 35,
home: 36
},
h = {
37: 1,
38: 1,
39: 1,
40: 1
};
function w() {
if (!s && document.body) {
s = !0;
var n = document.body,
r = document.documentElement,
c = window.innerHeight,
d = n.scrollHeight;
if (u = 0 <= document.compatMode.indexOf("CSS") ? r : n, e = n, a.keyboardSupport && P("keydown", S), top != self) l = !0;
else if (Q && c < d && (n.offsetHeight <= c || r.offsetHeight <= c)) {
var m, f = document.createElement("div");
if (f.style.cssText = "position:absolute; z-index:-10000; top:0; left:0; right:0; height:" + u.scrollHeight + "px", document.body.appendChild(f), o = function() {
m || (m = setTimeout(function() {
i || (f.style.height = "0", f.style.height = u.scrollHeight + "px", m = null)
}, 500))
},...