Sha256: b529eac5f686f7c6110ded45536aa895ee5934266ee705918ea62c29001fb6e9

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

$('.nav-tabs a.nav-tab-link').click(function () {
  $('.nav-tabs  a.nav-tab-link').removeClass('active')
})

const detect = document.querySelector('#detect')
const wrapper = document.querySelector('.wrapper')
const closePopup = document.getElementsByClassName('closePopup')
const extensions = document.querySelector('.extensions')

const refresh = () => {
  location.reload()
}

let adsBtn = document.querySelector('.allow-ads-btn')
adsBtn.addEventListener('click', () => {
  extensions.classList.add('show')
})

let adClasses = [
  'ad',
  'ads',
  'adsbox',
  'doubleclick',
  'ad-placement',
  'ad-placeholder',
  'adbadge',
  'BannerAd',
]
for (let item of adClasses) {
  detect.classList.add(item)
}

let getProperty = window.getComputedStyle(detect).getPropertyValue('display')
if (!wrapper.classList.contains('show')) {
  getProperty == 'none'
    ? wrapper.classList.add('show')
    : wrapper.classList.remove('show')
}
closePopup[0].addEventListener('click', () => {
  console.log(true)
  wrapper.classList.remove('show')
})
closePopup[1].addEventListener('click', () => {
  extensions.classList.remove('show')
})

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
appscms-tools-theme-1.9.7 assets/js/adBlocker.js
appscms-tools-theme-1.9.6 assets/js/adBlocker.js
appscms-tools-theme-1.9.5 assets/js/adBlocker.js
appscms-tools-theme-1.9.4 assets/js/adBlocker.js
appscms-tools-theme-1.9.3 assets/js/adBlocker.js
appscms-tools-theme-1.9.2 assets/js/adBlocker.js
appscms-tools-theme-1.8.9 assets/js/adBlocker.js
appscms-tools-theme-1.8.8 assets/js/adBlocker.js
appscms-tools-theme-1.8.7 assets/js/adBlocker.js
appscms-tools-theme-1.8.6 assets/js/adBlocker.js
appscms-tools-theme-1.8.5 assets/js/adBlocker.js
appscms-tools-theme-1.8.4 assets/js/adBlocker.js