theme-library
v1.5.0
Published
Theme Library
Downloads
13
Readme
Theme Library
Pages
How To Use
import adblockDetection from 'theme-library/module/adblock-detection'
import dataClipboard from 'theme-library/module/data-clipboard'
import dataLink from 'theme-library/module/data-link'
import dataSearch from 'theme-library/module/data-search'
import dataToggle from 'theme-library/module/data-toggle'
import utmBuilder from './module/utm-builder'
const head = document.querySelector('head')
const body = document.querySelector('body')
window.addEventListener('load', () => {
adblockDetection(head, body)
utmBuilder()
})
body.addEventListener('click', (event) => {
dataClipboard(event)
dataLink(event)
dataToggle(event)
})
body.addEventListener('submit', dataSearch)
-- OR --
<!DOCTYPE html>
<html lang="en">
<head>
...
<script defer src="https://cdn.jsdelivr.net/npm/theme-library/js/bundle.js"></script>
...
</head>
<body>
...
</body>
</html>