Include carbon script on static templates

This commit is contained in:
Sam Carlton 2022-03-06 15:30:36 -06:00
parent 088115d823
commit d1a330aac9
2 changed files with 4 additions and 1 deletions

View file

@ -71,7 +71,9 @@ const cleanNuxtLayout = ( layout ) => {
})
// Strip out existing scripts
Array.from(document.querySelectorAll('script[src*=".js"]')).forEach( domNode => {
const scriptSelector = 'script[src*=".js"]:not(.include-on-static)'
Array.from(document.querySelectorAll( scriptSelector )).forEach( domNode => {
domNode.remove()
})

View file

@ -123,6 +123,7 @@ export default {
async: true,
type: 'text/javascript',
id: '_carbonads_js',
class: 'include-on-static',
body: true
}
]