`)
+ const observer = new MutationObserver(function(mutations) {
+ document.querySelectorAll('#flexible-item-buttons.style-scope.ytd-menu-renderer ytd-download-button-renderer').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('tp-yt-paper-listbox.style-scope.ytd-menu-popup-renderer ytd-menu-service-item-download-renderer').forEach(t => {t.style.display = 'none';})
+ });
+ observer.observe(document, {subtree: true, childList: true});
+}
+
+chrome.storage.sync.get('down', function (data) {
+ if (data.down) {
+ down()
+ }
+});
+
+function noads() {
+ const observer = new MutationObserver(function(mutations) {
+ document.querySelectorAll('#player-ads').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('.ytd-page-top-ad').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('.ytd-ad-slot-renderer').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('ytd-rich-item-renderer:has(.ytd-ad-slot-renderer)').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('ytd-banner-promo-renderer').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('yt-mealbar-promo-renderer').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('ytd-rich-item-renderer:has(ytd-feed-nudge-renderer)').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('#attached-survey').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('div.ytp-suggested-action').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('ytd-brand-video-singleton-renderer').forEach(t => {t.style.display = 'none';})
+ document.querySelectorAll('.ytp-ad-player-overlay-flyout-cta').forEach(t=>{document.querySelector('video').playbackRate = 16.0;document.querySelector('video').currentTime = document.querySelector('video').duration;document.querySelector('.ytp-ad-skip-button-modern').click()})
+ document.querySelectorAll('.ytp-ad-skip-button-modern').forEach(t => {
+ t.click()
+ })
+ });
+ observer.observe(document, {subtree: true, childList: true});
+}
+
+chrome.storage.sync.get('noads', function (data) {
+ if (data.noads) {
+ noads()
+ }
+});
+
+chrome.storage.sync.get('nocurves', function (data) {
+ if (data.nocurves) {
+ document.head.insertAdjacentHTML("beforeend", ``)
+ }
+});
+
+chrome.storage.sync.get('noshorts', function (data) {
+ if (data.noshorts) {
+ document.head.insertAdjacentHTML("beforeend", ``)
+ }
+});
+
+chrome.storage.sync.get('nothanks', function (data) {
+ if (data.nothanks) {
+ document.head.insertAdjacentHTML("beforeend", ``)
+ }
+});
+
+chrome.storage.sync.get('nomix', function (data) {
+ if (data.nomix) {
+ const observer = new MutationObserver(function(mutations) {
+ document.querySelectorAll('ytd-rich-item-renderer:has(ytd-thumbnail-overlay-bottom-panel-renderer.ytd-playlist-thumbnail)').forEach(t => {t.style.display = 'none';})
+ });
+ observer.observe(document, {subtree: true, childList: true});
+ }
+});
\ No newline at end of file