1
0
Fork 0
mirror of https://github.com/safing/web synced 2025-04-12 15:09:08 +00:00
safing-web/vendor/safingTailwind/fonts/safing-icons-v1.5/demo-files/demo.js
davegson 264008c47a Upgrade to safing tailwind 1.9
- includes more icons
2022-08-11 16:08:00 +02:00

30 lines
996 B
JavaScript

if (!('boxShadow' in document.body.style)) {
document.body.setAttribute('class', 'noBoxShadow');
}
document.body.addEventListener("click", function(e) {
var target = e.target;
if (target.tagName === "INPUT" &&
target.getAttribute('class').indexOf('liga') === -1) {
target.select();
}
});
(function() {
var fontSize = document.getElementById('fontSize'),
testDrive = document.getElementById('testDrive'),
testText = document.getElementById('testText');
function updateTest() {
testDrive.innerHTML = testText.value || String.fromCharCode(160);
if (window.icomoonLiga) {
window.icomoonLiga(testDrive);
}
}
function updateSize() {
testDrive.style.fontSize = fontSize.value + 'px';
}
fontSize.addEventListener('change', updateSize, false);
testText.addEventListener('input', updateTest, false);
testText.addEventListener('change', updateTest, false);
updateSize();
}());