| 1 |
(function () { |
| 2 |
'use strict'; |
| 3 |
|
| 4 |
function initTextStroke(wrap) { |
| 5 |
var hoverFill = wrap.dataset.hoverFill; |
| 6 |
var hoverStroke = wrap.dataset.hoverStroke; |
| 7 |
|
| 8 |
if (hoverFill) wrap.style.setProperty('--bkts-hover-fill', hoverFill); |
| 9 |
if (hoverStroke) wrap.style.setProperty('--bkts-hover-stroke', hoverStroke); |
| 10 |
} |
| 11 |
|
| 12 |
function init() { |
| 13 |
document.querySelectorAll('.bkts-wrap[data-hover]').forEach(initTextStroke); |
| 14 |
} |
| 15 |
|
| 16 |
if (document.readyState === 'loading') { |
| 17 |
document.addEventListener('DOMContentLoaded', init); |
| 18 |
} else { |
| 19 |
init(); |
| 20 |
} |
| 21 |
|
| 22 |
}()); |
| 23 |
|