15 lines
454 B
Plaintext
15 lines
454 B
Plaintext
script.
|
|
(() => {
|
|
const abcjsInit = () => {
|
|
const abcjsFn = () => {
|
|
document.querySelectorAll(".abc-music-sheet").forEach(ele => {
|
|
ABCJS.renderAbc(ele, ele.innerHTML, {responsive: 'resize'})
|
|
})
|
|
}
|
|
|
|
typeof ABCJS === 'object' ? abcjsFn()
|
|
: getScript('!{url_for(theme.asset.abcjs_basic_js)}').then(abcjsFn)
|
|
}
|
|
|
|
window.pjax ? abcjsInit() : window.addEventListener('load', abcjsInit)
|
|
})() |