vue-videojs7
Version:
A vue video player plugin using video.js 7.
20 lines (17 loc) • 467 B
JavaScript
import constant from './utils/constant'
const AutoAdsense = {
install: (Vue, { adClient = '' }) => {
const head = document.head
const s = document.createElement('script')
s.type = 'text/javascript'
s.src = constant.ADS_SCRIPT
s.onload = () => {
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: adClient,
enable_page_level_ads: true
})
}
head.appendChild(s)
}
}
export default AutoAdsense