mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
25 lines
671 B
JavaScript
25 lines
671 B
JavaScript
function main () {
|
|
const ad_el = document.getElementById('bsa-cpc')
|
|
if (!ad_el || innerWidth < 800) {
|
|
// if no ad element or element hidden, don't load buysellads
|
|
return
|
|
}
|
|
const script = document.createElement('script')
|
|
script.onload = () => {
|
|
if (_bsa.isMobile()) {
|
|
// bsa doesn't show ads on mobile, hide th box
|
|
ad_el.remove()
|
|
return
|
|
}
|
|
_bsa.init('default', 'CK7ITKJU', 'placement:pydantic-docshelpmanualio', {
|
|
target: '#bsa-cpc',
|
|
align: 'horizontal',
|
|
})
|
|
ad_el.classList.add('loaded')
|
|
}
|
|
script.src = 'https://m.servedby-buysellads.com/monetization.js'
|
|
document.head.appendChild(script)
|
|
}
|
|
|
|
main()
|