Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
BlueWorld1 authored Jan 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c2fad8c commit ef27883
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions Youtube-Ad-blocker-Reminder-Remover.user.js
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@
}

if (popup) {
log( "Popup detected, removing...")
log("Popup detected, removing...")

if(popupButton) popupButton.click();

@@ -126,7 +126,7 @@
fullScreenButton.dispatchEvent(mouseEvent);
}, 500);

log( "Popup removed")
log("Popup removed")
}

// Check if the video is paused after removing the popup
@@ -141,7 +141,7 @@
// undetected adblocker method
function removeAds()
{
log('removeAds()')
log('removeAds()')

setInterval(() =>{

@@ -195,7 +195,7 @@
//
// Speed Skip Method
//
log( 'Found Ad')
log('Found Ad')


const skipButtons = ['ytp-ad-skip-button-container', 'ytp-ad-skip-button-modern', '.videoAdUiSkipButton', '.ytp-ad-skip-button', '.ytp-ad-skip-button-modern', '.ytp-ad-skip-button' ];
@@ -364,38 +364,38 @@
})
.catch(error => {
hasIgnoredUpdate = true;
log("Error checking for updates:", "e", error)
log("Error checking for updates:", "e", error)
});
hasIgnoredUpdate = true;
}

function log(log, level = 'l', ...args) {
if (debugMessages) {
const prefix = 'Remove Adblock Thing:'
const message = `${prefix} ${log}`;
switch (level) {
case 'e':
case 'err':
case 'error':
console.error(message, ...args);
break;
case 'l':
case 'log':
console.log(message, ...args);
break;
case 'w':
case 'warn':
case 'warning':
console.warn(message, ...args);
break;
case 'i':
case 'info':
default:
console.info(message, ...args);
break

}
}

}
function log(log, level = 'l', ...args) {
if (debugMessages) {
const prefix = 'Remove Adblock Thing:'
const message = `${prefix} ${log}`;
switch (level) {
case 'e':
case 'err':
case 'error':
console.error(message, ...args);
break;
case 'l':
case 'log':
console.log(message, ...args);
break;
case 'w':
case 'warn':
case 'warning':
console.warn(message, ...args);
break;
case 'i':
case 'info':
default:
console.info(message, ...args);
break

}
}

}
})();

0 comments on commit ef27883

Please sign in to comment.