diff --git a/package.json b/package.json index 4855b46..22e989e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MenuTube", - "version": "1.7.1", + "version": "1.7.2", "description": "Catch YouTube into your macOS menu bar!", "main": "main.js", "scripts": { diff --git a/src/wvHelper.js b/src/wvHelper.js index 8ddfa0b..36d7d01 100644 --- a/src/wvHelper.js +++ b/src/wvHelper.js @@ -10,12 +10,12 @@ document.addEventListener = () => { var config = AppConfig.store.userPreferences; if (!!config.adBlock) { - const _check = v => v !== null && v !== undefined && !isNaN(v); + const _check = v => v !== null && v !== undefined; setInterval(() => { const ad = [...document.querySelectorAll('.ad-showing')][0]; if (_check(ad)) { const video = document.querySelector('video'); - if (_check(video) && _check(video.duration)) { + if (_check(video) && !isNaN(video.duration)) { video.currentTime = video.duration; } }