Skip to content

Commit

Permalink
Fix for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBraquet committed Jun 11, 2024
1 parent 44a03de commit 4c98963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function checkForAds() {
let videos = player.getElementsByClassName("video-stream html5-main-video");
for (const video of videos) {
if (_adExist) {
if (video && video.playbackRate <= 2) {
if (video && !video.hidden) {
userMuted = video.muted;
video.muted = video.hidden = true;

Expand All @@ -93,7 +93,7 @@ async function checkForAds() {
}
}
} else {
if (video && video.playbackRate > 2) {
if (video && video.hidden) {
video.muted = userMuted;
video.hidden = false;
video.playbackRate = userPlaybackRate;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "YouTube AdBlock",
"version": "1.63",
"version": "1.64",
"description": "Accelerates and skips YouTube Ads in Two Seconds or Less",
"permissions": [
"storage",
Expand Down

0 comments on commit 4c98963

Please sign in to comment.