UNPKG

@huluvu424242/honey-slideshow

Version:

Text to Speech component wich is reading texts from DOM elements.

30 lines (22 loc) 1 kB
(function(doc){ var scriptElm = doc.scripts[doc.scripts.length - 1]; var warn = ['[honey-slideshow] Deprecated script, please remove: ' + scriptElm.outerHTML]; warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:') var parts = scriptElm.src.split('/'); parts.pop(); parts.push('honey-slideshow'); var url = parts.join('/'); var scriptElm = doc.createElement('script'); scriptElm.setAttribute('type', 'module'); scriptElm.src = url + '/honey-slideshow.esm.js'; warn.push(scriptElm.outerHTML); scriptElm.setAttribute('data-stencil-namespace', 'honey-slideshow'); doc.head.appendChild(scriptElm); scriptElm = doc.createElement('script'); scriptElm.setAttribute('nomodule', ''); scriptElm.src = url + '/honey-slideshow.js'; warn.push(scriptElm.outerHTML); scriptElm.setAttribute('data-stencil-namespace', 'honey-slideshow'); doc.head.appendChild(scriptElm) console.warn(warn.join('\n')); })(document);