Skip to content

Commit

Permalink
Fix bug related to ad blocking. Release 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
edanchenkov committed Jun 25, 2020
1 parent 732d03a commit 36a7ff9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/wvHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 36a7ff9

Please sign in to comment.