您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动接受cookie并移除烦人的cookie弹窗
当前为
// ==UserScript== // @name I don't care about cookies // @name:vi Tôi không quan tâm về cookie // @name:zh-CN 我不关心cookie // @name:zh-TW 我不關心cookie // @name:ja クッキーについては気にしない // @name:ru Я не забочусь о куки // @namespace http://tampermonkey.net/ // @version 2025.01.03.1 // @description Remove cookie warnings from almost all websites! Auto accept cookies and remove annoying cookie popups // @description:vi Loại bỏ cảnh báo cookie từ hầu hết các trang web! Tự động chấp nhận cookie và xóa các popup cookie phiền phức // @description:zh-CN 自动接受cookie并移除烦人的cookie弹窗 // @description:zh-TW 自動接受cookie並移除煩人的cookie彈窗 // @description:ru Автоматическое принятие cookie и удаление надоедливых всплывающих окон // @description:ja 自動承認cookieと迷惑なポップアップを削除 // @author Yuusei // @match *://*/* // @grant none // @icon https://lh3.googleusercontent.com/sCLTYpGX0VcVootQ_XaFQ9saRIhVWu79ngSzY5eTZ5evRpJ_Q27OdvxA4RrOoZXP7Q4enFh-u6VhxObcJLfARw1g=s60 // @compatible chrome // @compatible edge // @compatible firefox // @compatible safari // @run-at document-start // @license gpl-3.0-only // ==/UserScript== (function () { 'use strict'; const CONSENT_TEXTS = { en: ['accept', 'accept all', 'agree', 'continue', 'got it', 'reject all', 'decline', 'necessary only', 'required only', 'manage', 'customize'], vi: ['chấp nhận', 'chấp nhận tất cả', 'đồng ý', 'tiếp tục', 'từ chối tất cả', 'từ chối', 'chỉ cần thiết', 'tùy chỉnh', 'quản lý', 'cho phép', 'đồng ý và tiếp tục', 'tôi đồng ý', 'xác nhận'], zh: ['接受', '接受所有', '同意', '继续', '拒绝全部', '拒绝', '仅必要', '管理', '自定义'], ru: ['принять', 'принять все', 'согласен', 'продолжить', 'отклонить все', 'отклонить', 'только необходимые', 'настроить', 'управлять'], ja: ['承認', '同意', '続ける', 'すべて拒否', '拒否', '必要のみ', 'カスタマイズ', '管理'], de: ['akzeptieren', 'einverstanden', 'fortfahren', 'alle ablehnen', 'ablehnen', 'nur notwendige', 'anpassen', 'verwalten'], fr: ['accepter', 'accepter tout', 'accepte', 'continuer', 'tout refuser', 'refuser', 'uniquement nécessaire', 'personnaliser', 'gérer'], es: ['aceptar', 'acepto todo', 'acepto', 'continuar', 'rechazar todo', 'rechazar', 'solo necesario', 'personalizar', 'gestionar'], it: ['accetta', 'accetto tutto', 'accetto', 'continua', 'rifiuta tutto', 'rifiuta', 'solo necessari', 'personalizza', 'gestisci'], pl: ['akceptuj', 'akceptuj wszystko', 'zgadzam się', 'kontynuuj', 'odrzuć wszystko', 'odrzuć', 'tylko niezbędne', 'dostosuj', 'zarządzaj'], nl: ['accepteren', 'accepteren', 'doorgaan', 'alles weigeren', 'weigeren', 'alleen noodzakelijk', 'aanpassen', 'beheren'], ko: ['동의', '모두 동의', '계속하기', '모두 거부', '거부', '필수만', '관리', '설정'], th: ['ยอมรับ', 'ยอมรับทั้งหมด', 'ตกลง', 'ดำเนินการต่อ', 'ปฏิเสธทั้งหมด', 'ปฏิเสธ', 'จำเป็นเท่านั้น', 'จัดการ'], id: ['terima', 'terima semua', 'setuju', 'lanjutkan', 'tolak semua', 'tolak', 'hanya diperlukan', 'kelola'], ms: ['terima', 'terima semua', 'setuju', 'teruskan', 'tolak semua', 'tolak', 'hanya diperlukan', 'urus'], }; function matchesConsentText(element) { const text = element.textContent.toLowerCase(); const lang = document.documentElement.lang || 'en'; const texts = CONSENT_TEXTS[lang.split('-')[0]] || CONSENT_TEXTS['en']; return texts.some(t => text.includes(t)); } // Utility functions function _sl(selector, container) { return (container || document).querySelector(selector); } function _id(id) { return document.getElementById(id); } function _ev(selector, container, full) { return document.evaluate((typeof full == 'undefined' ? '//' : '') + selector, container || document, null, XPathResult.ANY_TYPE, null).iterateNext(); } function _if(condition, ...selectors) { return _sl(condition) ? _chain(...selectors) : false; } function _if_else(condition, if_selectors, else_selectors) { if (_sl(condition)) return _chain(...if_selectors); return _chain(...else_selectors); } function _chain(...selectors) { let elements, l = selectors.length; let flagUnique = false, flagOptional = false, flagAllMatches = false; for (let i = currentChainElement; i < l; i++) { if (/^FLAG\:/.test(selectors[i])) { selectors[i] .split(':')[1] .split(',') .forEach(function (flag) { if (flag == 'UNIQUE') flagUnique = true; else if (flag == 'OPTIONAL') flagOptional = true; else if (flag == 'REQUIRED') flagOptional = false; else if (flag == 'ALL-MATCHES') flagAllMatches = true; else if (flag == 'SINGLE-MATCH') flagAllMatches = false; }); continue; } if (flagUnique) selectors[i] += selectors[i].startsWith('//') ? '[not(contains(@class, "' + classname + '"))]' : ':not(.' + classname + ')'; if (i == l - 1) return selectors[i]; elements = _sl(selectors[i], false, flagAllMatches); if (!flagAllMatches) elements = elements ? [elements] : []; if (!elements.length) { if (flagOptional) { currentChainElement++; continue; } return false; } currentChainElement++; elements.forEach(function (element) { if (flagUnique) element.classList.add(classname); if (element.nodeName == 'OPTION') element.selected = true; else element.click(); }); } return false; } function getItem(hostname) { switch (hostname) { case 'youtube.com': case 'www.youtube.com': return { strict: true, key: 'CONSENT', value: 'PENDING+999' }; case 'google.com': case 'www.google.com': return { strict: true, key: 'CONSENT', value: 'YES+' }; case 'twitter.com': case 'www.twitter.com': return { strict: false, key: 'twtr_cookie_consent', value: '1' }; case 'pepephone.com': case 'lyricsbox.com': return { strict: true, key: 'cookieconsent', value: '1111' }; case 'kontaktbazar.at': case 'hoernews.de': return { strict: false, key: 'cookieconsent_status', value: 'dismiss' }; case 'vodafoneziggo.nl': return { strict: false, key: 'cookies-accepted', value: 'true' }; case 'frankfurt.de': return { strict: false, key: 'cookieAccepted', value: 'needed---piwik' }; case 'hackerrank.com': return { strict: false, key: 'show_cookie_banner', value: 'false' }; case 'facebook.com': case 'www.facebook.com': return { strict: true, key: 'datr', value: 'accepted' }; case 'instagram.com': case 'www.instagram.com': return { strict: true, key: 'ig_did', value: 'accepted' }; case 'linkedin.com': case 'www.linkedin.com': return { strict: false, key: 'lidc', value: 'accepted' }; case 'reddit.com': case 'www.reddit.com': return { strict: false, key: 'eu_cookie', value: '{"opted":true}' }; case 'tiktok.com': case 'www.tiktok.com': return { strict: true, key: 'tt_webid', value: 'accepted' }; case 'netflix.com': case 'www.netflix.com': return { strict: false, key: 'netflix-cookie-consent', value: 'accepted' }; case 'spotify.com': case 'www.spotify.com': return { strict: false, key: 'sp_dc', value: 'accepted' }; case 'amazon.com': case 'www.amazon.com': return { strict: false, key: 'amazon-cookie-consent', value: 'accepted' }; case 'pinterest.com': case 'www.pinterest.com': return { strict: false, key: '_pinterest_sess', value: 'accepted' }; case 'twitch.tv': case 'www.twitch.tv': return { strict: false, key: 'twitch_cookie_consent', value: 'accepted' }; case 'github.com': case 'www.github.com': return { strict: false, key: '_gh_sess', value: 'accepted' }; case 'medium.com': case 'www.medium.com': return { strict: false, key: 'medium_cookie_consent', value: 'accepted' }; case 'quora.com': case 'www.quora.com': return { strict: false, key: 'm-b', value: 'accepted' }; case 'stackoverflow.com': case 'www.stackoverflow.com': return { strict: false, key: 'acct', value: 'accepted' }; case 'microsoft.com': case 'www.microsoft.com': return { strict: false, key: 'MUID', value: 'accepted' }; case 'apple.com': case 'www.apple.com': return { strict: false, key: 'geo', value: 'accepted' }; case 'dropbox.com': case 'www.dropbox.com': return { strict: false, key: 'dbx-consent', value: 'accepted' }; case 'booking.com': case 'www.booking.com': return { strict: false, key: 'bkng_consent', value: 'accepted' }; case 'vnexpress.net': case 'www.vnexpress.net': return { strict: false, key: 'vnexpress_cookie_consent', value: 'accepted' }; case 'thanhnien.vn': case 'www.thanhnien.vn': return { strict: false, key: 'thanhnien_cookie', value: 'accepted' }; case 'tuoitre.vn': case 'www.tuoitre.vn': return { strict: false, key: 'tuoitre_cookie', value: 'accepted' }; case 'tiki.vn': case 'www.tiki.vn': return { strict: false, key: 'tiki_cookie', value: 'accepted' }; case 'shopee.vn': case 'www.shopee.vn': return { strict: false, key: 'shopee_cookie', value: 'accepted' }; case 'lazada.com': case 'www.lazada.com': return { strict: false, key: 'lzd_cid', value: 'accepted' }; case 'aliexpress.com': case 'www.aliexpress.com': return { strict: false, key: 'aep_usuc_f', value: 'accepted' }; case 'ebay.com': case 'www.ebay.com': return { strict: false, key: 'ebay_cookie_consent', value: 'accepted' }; case 'coursera.org': case 'www.coursera.org': return { strict: false, key: 'coursera_cookie', value: 'accepted' }; case 'udemy.com': case 'www.udemy.com': return { strict: false, key: 'ud_cookie', value: 'accepted' }; } const parts = hostname.split('.'); if (parts.length > 2) { parts.shift(); return getItem(parts.join('.')); } return false; } function _parent(element) { if (element && element.parentNode) return element.parentNode; return false; } function _iframe(iframe_selector, selector) { var e = _sl(iframe_selector); return e ? _sl(selector, e.contentDocument || e.contentWindow.contentDocument) : e; } // Cookie consent handling logic let searchPairs = { '#CybotCookiebotDialog': ['#CybotCookiebotDialogBodyButtonDecline', '#CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll', '#CybotCookiebotDialogBodyButtonPreferences', '#CybotCookiebotDialogBodyLevelButtonNecessary'], '.qc-cmp2-container': ['button[mode="primary"][aria-label*="Reject"]', 'button[mode="primary"].css-47sehv', '.qc-cmp2-buttons-desktop button:first-child'], '#didomi-host': ['.didomi-button-highlight[aria-label*="refuse"]', '.didomi-consent-popup-actions button:first-child', '.didomi-buttons-container button:first-child'], '.wp-exclude-emoji': ['div[id^="bnnr"] > div[style*="; order: 1"] span', 'a[data-order]:nth-child(2) span'], '#usercentrics-root': ['div[data-testid="uc-buttons-container"] > button:first-child', 'div[data-testid="first-line-buttons"] > button:first-child', 'div[data-testid="privacy-notice-buttons"] > button:first-child'], '#onetrust-consent-sdk': ['.onetrust-pc-dark-filter:not([class*="hide"]):not([style*="none"]) ~ #onetrust-pc-sdk .ot-pc-refuse-all-handler', '#onetrust-banner-sdk:not([style*="none"]) .ot-pc-refuse-all-handler', '#onetrust-banner-sdk:not([style*="none"]) #onetrust-reject-all-handler', '.onetrust-pc-dark-filter:not([class*="hide"]):not([style*="none"]) + #onetrust-banner-sdk #onetrust-button-group-parent:not(.has-reject-all-button) #onetrust-pc-btn-handler', '.onetrust-pc-dark-filter:not([class*="hide"]):not([style*="none"]) ~ #onetrust-pc-sdk .onetrust-close-btn-handler:first-child', '#onetrust-pc-sdk .ot-pc-refuse-all-handler', '#onetrust-pc-sdk .save-preference-btn-handler'], '#CybotCookiebotDialog': ['#CybotCookiebotDialogBodyButtonDecline', '#CybotCookiebotDialogBodyLevelButtonLevelOptinDeclineAll'], '.klaro': ['.cm-btn-success', '.cm-btn[aria-label*="accept"]', '.cm-btn[data-text*="accept"]'], '#cookieyes-modal': ['.cookie-accept-all', '.cky-btn-accept', '.cky-consent-bar .cky-btn-accept'], '.osano-cm-window': ['.osano-cm-button--type_accept', '.osano-cm-accept-all', '.osano-cm-dialog button[aria-label*="Accept"]'], '.iubenda-cs-container': ['.iubenda-cs-accept-btn', '.iubenda-cs-btn-primary', 'button[data-action="accept-all"]'], '#sp-cc': ['.sp-cc-buttons .sp-cc-reject', '.sp-cc-buttons .sp-cc-customize'], '.netflix-cookie-banner': ['.cookie-policy-button[data-uia="cookie-policy-reject"]'], '.tiktok-cookie-banner': ['.cookie-banner__reject-all', '.cookie-banner__customize'], '.spotify-cookie-notice': ['.cookie-notice__buttons button:first-child'], '.fc-consent-root': ['.fc-cta-consent', '.fc-primary-button[data-test-id="button-deny"]'], '#onetrust-banner-sdk': ['#onetrust-reject-all-handler', '#onetrust-pc-btn-handler', '.ot-pc-refuse-all-handler'], '.cookie-notice': ['.cookie-notice-buttons .reject-cookies', '.cookie-notice-buttons .customize-cookies'], '.gdpr-banner': ['.gdpr-banner-actions .reject-all', '.gdpr-banner-actions .customize'], '#cookie-law-info-bar': ['#cookie_action_reject', '#cookie_action_settings'], '.cookielaw-banner': ['.cookielaw-banner-actions .reject-all-cookies', '.cookielaw-banner-actions .cookie-settings'], '.cookie-modal': ['.cookie-modal-footer .decline-all', '.cookie-modal-footer .settings'], '#cookiebanner': ['#cookiebanner-reject-all', '#cookiebanner-settings'], '.cc-window': ['.cc-deny', '.cc-customize-settings'], '.cookie-consent-modal': ['.cookie-consent-modal__reject-all', '.cookie-consent-modal__customize'], '.privacy-settings': ['.privacy-settings__reject-all', '.privacy-settings__customize'], '#cookie-preferences': ['#cookie-preferences-reject', '#cookie-preferences-customize'], '.consent-manager': ['.consent-manager__reject-all', '.consent-manager__settings'], '.cookie-settings-overlay': ['.cookie-settings__reject-button', '.cookie-settings__customize-button'], '#gdpr-consent-tool': ['#gdpr-reject-all', '#gdpr-customize'], '.privacy-consent': ['.privacy-consent__reject', '.privacy-consent__settings'], '.cookie-wall': ['.cookie-wall__reject', '.cookie-wall__customize'], '.privacy-wall': ['.privacy-wall__reject-all', '.privacy-wall__settings'], '.gdpr-wall': ['.gdpr-wall__reject', '.gdpr-wall__customize'], '.consent-wall': ['.consent-wall__reject', '.consent-wall__settings'], '.cookie-overlay': ['.cookie-overlay__reject', '.cookie-overlay__customize'], '.privacy-overlay': ['.privacy-overlay__reject-all', '.privacy-overlay__settings'], '.gdpr-overlay': ['.gdpr-overlay__reject', '.gdpr-overlay__customize'], '.consent-overlay': ['.consent-overlay__reject', '.consent-overlay__settings'], '.cookie-drawer': ['.cookie-drawer__reject', '.cookie-drawer__customize'], '.privacy-drawer': ['.privacy-drawer__reject-all', '.privacy-drawer__settings'], '.gdpr-drawer': ['.gdpr-drawer__reject', '.gdpr-drawer__customize'], '.consent-drawer': ['.consent-drawer__reject', '.consent-drawer__settings'], '.cookie-popup-modal': ['.cookie-popup-modal__reject-all', '.cookie-popup-modal__settings'], '.cookie-banner-overlay': ['.cookie-banner-overlay__decline', '.cookie-banner-overlay__preferences'], '.cookie-consent-banner': ['.cookie-consent-banner__decline-all', '.cookie-consent-banner__customize', 'button[data-testid="cookie-decline-all"]'], '.cookie-notification-modal': ['.cookie-notification-modal__reject', '.cookie-notification-modal__settings', 'button[data-purpose="cookie-decline"]'], '.cookie-permission-dialog': ['.cookie-permission-dialog__reject', '.cookie-permission-dialog__settings', 'button[data-cookie-action="reject"]'], '.cookie-policy-banner': ['.cookie-policy-banner__reject-all', '.cookie-policy-banner__preferences', 'button[data-test="cookie-policy-reject"]'], '[data-module="cookie-banner"]': ['[data-testid="cookie-reject"]', '[data-testid="cookie-settings"]', 'button[data-qa="reject-cookies"]'], '[data-component="cookie-notice"]': ['[data-action="reject-all"]', '[data-action="cookie-preferences"]', 'button[data-cy="cookie-reject"]'], '[aria-label*="cookie"]': ['button[aria-label*="reject"]', 'button[aria-label*="decline"]', 'button[aria-label*="preferences"]'], '[role="dialog"][aria-label*="cookie"]': ['button[data-action*="reject"]', 'button[data-action*="decline"]', 'button[data-action*="settings"]'], '.gtm-cookie-notice': ['.gtm-cookie-notice__reject', '.gtm-cookie-notice__settings'], '.ga-cookie-consent': ['.ga-cookie-consent__reject-all', '.ga-cookie-consent__preferences'], '.fb-cookie-notice': ['.fb-cookie-notice__reject', '.fb-cookie-notice__customize'], '.cookie-compliance': ['.cookie-compliance__reject', '.cookie-compliance__settings'], '.cookie-preferences-center': ['.cookie-preferences-center__reject-all', '.cookie-preferences-center__customize'], '.cookie-management': ['.cookie-management__reject', '.cookie-management__settings'], '.cookie-configuration': ['.cookie-configuration__reject-all', '.cookie-configuration__preferences'], '[data-widget="cookie-banner"]': ['[data-test="cookie-reject"]', '[data-test="cookie-settings"]', 'button[data-e2e="reject-cookies"]'], '[data-element="cookie-notice"]': ['[data-ref="reject-all"]', '[data-ref="cookie-settings"]', 'button[data-automation="cookie-reject"]'], '.cookie-layer': ['.cookie-layer__reject', '.cookie-layer__settings'], '.cookie-section': ['.cookie-section__reject', '.cookie-section__preferences'], '.cookie-container': ['.cookie-container__reject', '.cookie-container__settings'], '.matomo-cookie-banner': ['.matomo-cookie-banner__reject', '.matomo-cookie-banner__settings'], '.hubspot-cookie-notice': ['.hubspot-cookie-notice__reject', '.hubspot-cookie-notice__customize'], '.segment-cookie-notice': ['.segment-cookie-notice__reject', '.segment-cookie-notice__settings'], '#cookie-manager': ['#cookie-reject-all', '#cookie-settings'], '#cookie-control': ['#cookie-control-reject', '#cookie-control-customize'], '#cookie-panel': ['#cookie-panel-reject', '#cookie-panel-settings'], }; let searchGroups = [ '.qc-cmp2-summary-buttons button[mode="secondary"],\ .qc-cmp2-buttons-desktop > button:first-child,\ #didomi-popup .didomi-button-highlight:not([class*="paywall"]):not([class*="disagree"]),\ #rgpd_video .rgpd-mask a[data-rgpd-consent],\ .cli-barmodal-open #wt-cli-privacy-save-btn,\ .js--modal[style*="block"] .cookie-permission--accept-button,\ .gdpr-modal-rider .btn-cookieaccept,\ .js-cookiewall #sel-test-accept-cookies-button,\ #mpo[style*="block"] .submit.modal-privacy__btn[onclick*="privacyframe.accept"],\ .lightbox--cookie-consent .btn-cta,\ .lightbox.cookie-consent .cookie-consent-button-decline,\ .js-modal-gdpr.is-active .btn[data-level="2"],\ #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection,\ #cookieNotificationModal.in .btn.accept-cookie,\ .has-ccwindow .cc-compliance .cc-dismiss,\ .ds2-cookie-disclaimer--slidedown .ds2-cookie-disclaimer-js--submit,\ #mdlCookieCompliance.in .cookieClose,\ #cookieModal.in .js-acceptDefaultCookie,\ .c-cookiebutton .c-cookiebutton__close,\ #normativa_cookies.in .btn,\ #cookiewall.in .btn-primary,\ .outerCookieBar .EuCookieBar__cookieButton,\ #TOS-POPUP .rhododendron-popup__button--agree,\ #cookie-wall #accept-cookies,\ #popup-wrapper .button[href*="/cookies.consent.php"],\ .reveal.cookies[style*="block"] button[click*="aceptaCookies"],\ .mnd-cookie-modal[style*="block"] .btn.is--primary,\ .cookieHandler.cookieHandler--modalOpen #acceptAllCookies,\ .gdpr-modal--active .btn--primary,\ #dpi-banner:not(.hidden) #btn-agree-cookie,\ .gh-banner.gh-banner-active #gh-cookiebanner-close,\ #mrktpref.notification-bar .btn-success,\ #PopinGDPRCookie[style*="block"] .jsbd-popin-ok,\ #modal-rodo.in .btn-primary,\ .cookie-compliance-modal.in .btn-primary,\ .cookieconsent.show .btn[data-dm*="accept"],\ .cookie-wall-modal.in .btn.ja,\ #modal-consent.in .modal-consent-accept,\ .rodo #cookies.in .btn-primary,\ .js-cookie-alert.in .js-cookie-alert-accept,\ #modal_gdpr_intro_popup.in #gdpr-modal-btn-ok-agree,\ #consentButtonContainer > button[onclick*="sendAndRedirect"],\ #eu-consent[style*="block"] .btn.yes,\ .modal--gdpr.is-open .js-gdpr-consent,\ #cookiePopupModal.in .cookiepopup-agreed,\ .polityka-cookie-rodo[style*="block"] .button-zgoda,\ .ui-dialog.consent-modal[style*="block"] .js-btn-agree,\ #up-cookie.active .button[onclick*="setCookiePreference"],\ .RodoModal.in .close,\ .consent-popup form[action*="cookie-consent"] .consent-popup__button,\ #consent form[action*="cookie-consent"] .one-btn,\ #cookiewall-wrapper .button[href*="accept"],\ #cookieChoiceButtonAccept,\ .mod-cookie-consent[style*="block"] .btn-all-cookies,\ .c-layer--consent .layer-button--accept,\ .button.button-ok[onclick*="acceptAVG"],\ #meredithGdprConsentFormButton,\ #advanced-cookie-modal.in .cookie-accept,\ .show-modal .cookie-settings-manager-container .initial-dialog .js-accept-button,\ .cookie-settings-manager-container .initial-dialog[style*="block"] .js-accept-button,\ .gdprLightbox[data-module="gdprLightbox"] ._type_gdpr_agree,\ .cookie.showa #Row1_Column1_Cell1_CookieSettings_AdvancedSaveAccept,\ #core-cookie-container[style*="block"] .btn--agree,\ .cookie-consent-modal._show .action-primary,\ #dsgvoModal.show #dsvgo-banner__button,\ .basicLightbox--visible #accept-all-gdpr,\ #gdpr-modal.in .gdpr-modal__btn--accept,\ .cookiehint .btn.cookieagree,\ #cookiealert .modal.in .btn[href*="accept"],\ #lml-data-consent-accept,\ #CBCookieMsg.in .btn[onclick*="approveCookies"],\ #cookiewall-container .button[name="submit"],\ #cookie_disclaimer.in .cookie_disclaimer_button,\ .m-cookie.iziModal[style*="block"] .m-cookie__save2.button,\ kamino-cookie-policy .mat-raised-button,\ #surbma-gpga-modal[style*="block"] button,\ #GDPR.overlayBox .menuButton,\ #cookiebar .cookie-selection-button.accept,\ .modal.in .btn.close-modal-cookie,\ #consent-module[style*="block"] #consent-module-text-button,\ .modal #consentButton,\ #consent-modal[style*="block"] .lm_modal__modal__content__body__buttons__ok,\ .cookiesOverlay3Box #cookiesConsentOK,\ .bemCookieOverlay--activePopup .bemCookieOverlay__btn--save,\ #root main ~ div [data-gi-selector="reject-all-cookies"] ~ div a,\ .cookies-management .cookies-deny,\ .offcanvas.is-open .js-offcanvas-cookie-submit,\ .force--consent.show--consent #cs_save__btn,\ .force--consent.show--consent #s-sv-bn,\ #cookieNoticeModal.vrm-reveal[style*="block"] .vrm-reveal__icon--close', '.cookie-banner .cookie-banner__buttons .cookie-banner__button--reject,\ .cookie-consent-banner .cookie-consent-banner__reject,\ .cookie-notification .cookie-notification__buttons .cookie-notification__reject,\ .cookie-policy-banner .cookie-policy-banner__buttons .cookie-policy-banner__reject,\ .cookie-warning .cookie-warning__buttons .cookie-warning__reject,\ .cookie-notice .cookie-notice__buttons .cookie-notice__reject,\ .cookie-alert .cookie-alert__buttons .cookie-alert__reject,\ .cookie-popup .cookie-popup__buttons .cookie-popup__reject,\ .cookie-modal .cookie-modal__buttons .cookie-modal__reject,\ .cookie-dialog .cookie-dialog__buttons .cookie-dialog__reject,\ .gdpr-banner .gdpr-banner__buttons .gdpr-banner__reject,\ .gdpr-modal .gdpr-modal__buttons .gdpr-modal__reject,\ .gdpr-notice .gdpr-notice__buttons .gdpr-notice__reject,\ .gdpr-popup .gdpr-popup__buttons .gdpr-popup__reject,\ .gdpr-dialog .gdpr-dialog__buttons .gdpr-dialog__reject,\ .privacy-banner .privacy-banner__buttons .privacy-banner__reject,\ .privacy-modal .privacy-modal__buttons .privacy-modal__reject,\ .privacy-notice .privacy-notice__buttons .privacy-notice__reject,\ .privacy-popup .privacy-popup__buttons .privacy-popup__reject,\ .privacy-dialog .privacy-dialog__buttons .privacy-dialog__reject', '.consent-banner .consent-banner__buttons .consent-banner__reject,\ .consent-modal .consent-modal__buttons .consent-modal__reject,\ .consent-notice .consent-notice__buttons .consent-notice__reject,\ .consent-popup .consent-popup__buttons .consent-popup__reject,\ .consent-dialog .consent-dialog__buttons .consent-dialog__reject,\ .tracking-banner .tracking-banner__buttons .tracking-banner__reject,\ .tracking-modal .tracking-modal__buttons .tracking-modal__reject,\ .tracking-notice .tracking-notice__buttons .tracking-notice__reject,\ .tracking-popup .tracking-popup__buttons .tracking-popup__reject,\ .tracking-dialog .tracking-dialog__buttons .tracking-dialog__reject', '.cookie-settings-modal .cookie-settings__reject,\ .cookie-settings-modal .cookie-settings__customize,\ .cookie-preferences-modal .cookie-preferences__reject,\ .cookie-preferences-modal .cookie-preferences__customize,\ .cookie-manager-modal .cookie-manager__reject,\ .cookie-manager-modal .cookie-manager__customize,\ .cookie-control-modal .cookie-control__reject,\ .cookie-control-modal .cookie-control__customize,\ .cookie-options-modal .cookie-options__reject,\ .cookie-options-modal .cookie-options__customize', '.data-privacy-modal .data-privacy__reject,\ .data-privacy-modal .data-privacy__customize,\ .data-protection-modal .data-protection__reject,\ .data-protection-modal .data-protection__customize,\ .data-consent-modal .data-consent__reject,\ .data-consent-modal .data-consent__customize,\ .data-settings-modal .data-settings__reject,\ .data-settings-modal .data-settings__customize,\ .data-preferences-modal .data-preferences__reject,\ .data-preferences-modal .data-preferences__customize', '.privacy-manager-modal .privacy-manager__reject,\ .privacy-manager-modal .privacy-manager__customize,\ .privacy-settings-modal .privacy-settings__reject,\ .privacy-settings-modal .privacy-settings__customize,\ .privacy-options-modal .privacy-options__reject,\ .privacy-options-modal .privacy-options__customize,\ .privacy-control-modal .privacy-control__reject,\ .privacy-control-modal .privacy-control__customize,\ .privacy-preferences-modal .privacy-preferences__reject,\ .privacy-preferences-modal .privacy-preferences__customize', '.consent-manager-modal .consent-manager__reject,\ .consent-manager-modal .consent-manager__customize,\ .consent-settings-modal .consent-settings__reject,\ .consent-settings-modal .consent-settings__customize,\ .consent-options-modal .consent-options__reject,\ .consent-options-modal .consent-options__customize,\ .consent-control-modal .consent-control__reject,\ .consent-control-modal .consent-control__customize,\ .consent-preferences-modal .consent-preferences__reject,\ .consent-preferences-modal .consent-preferences__customize', '.tracking-manager-modal .tracking-manager__reject,\ .tracking-manager-modal .tracking-manager__customize,\ .tracking-settings-modal .tracking-settings__reject,\ .tracking-settings-modal .tracking-settings__customize,\ .tracking-options-modal .tracking-options__reject,\ .tracking-options-modal .tracking-options__customize,\ .tracking-control-modal .tracking-control__reject,\ .tracking-control-modal .tracking-control__customize,\ .tracking-preferences-modal .tracking-preferences__reject,\ .tracking-preferences-modal .tracking-preferences__customize', '.gdpr-manager-modal .gdpr-manager__reject,\ .gdpr-manager-modal .gdpr-manager__customize,\ .gdpr-settings-modal .gdpr-settings__reject,\ .gdpr-settings-modal .gdpr-settings__customize,\ .gdpr-options-modal .gdpr-options__reject,\ .gdpr-options-modal .gdpr-options__customize,\ .gdpr-control-modal .gdpr-control__reject,\ .gdpr-control-modal .gdpr-control__customize,\ .gdpr-preferences-modal .gdpr-preferences__reject,\ .gdpr-preferences-modal .gdpr-preferences__customize', 'div[class*="cookie-banner"] button[class*="reject"],\ div[class*="cookie-banner"] button[class*="decline"],\ div[class*="cookie-banner"] button[class*="settings"],\ div[id*="cookie-banner"] button[class*="reject"],\ div[id*="cookie-banner"] button[class*="decline"],\ div[id*="cookie-banner"] button[class*="settings"]', 'div[class*="cookie-consent"] button[class*="reject"],\ div[class*="cookie-consent"] button[class*="decline"],\ div[class*="cookie-consent"] button[class*="settings"],\ div[id*="cookie-consent"] button[class*="reject"],\ div[id*="cookie-consent"] button[class*="decline"],\ div[id*="cookie-consent"] button[class*="settings"]', 'div[class*="cookie-notice"] button[class*="reject"],\ div[class*="cookie-notice"] button[class*="decline"],\ div[class*="cookie-notice"] button[class*="settings"],\ div[id*="cookie-notice"] button[class*="reject"],\ div[id*="cookie-notice"] button[class*="decline"],\ div[id*="cookie-notice"] button[class*="settings"]', '[data-*="cookie"] button[data-*="reject"],\ [data-*="cookie"] button[data-*="decline"],\ [data-*="cookie"] button[data-*="settings"],\ [data-*="gdpr"] button[data-*="reject"],\ [data-*="gdpr"] button[data-*="decline"],\ [data-*="gdpr"] button[data-*="settings"]', 'div[class*="cookie-layer"] button[class*="reject"],\ div[class*="cookie-layer"] button[class*="decline"],\ div[class*="cookie-layer"] button[class*="settings"],\ div[id*="cookie-layer"] button[class*="reject"],\ div[id*="cookie-layer"] button[class*="decline"],\ div[id*="cookie-layer"] button[class*="settings"]', 'div[class*="cookie-section"] button[class*="reject"],\ div[class*="cookie-section"] button[class*="decline"],\ div[class*="cookie-section"] button[class*="settings"],\ div[id*="cookie-section"] button[class*="reject"],\ div[id*="cookie-section"] button[class*="decline"],\ div[id*="cookie-section"] button[class*="settings"]', 'div[class*="cookie-container"] button[class*="reject"],\ div[class*="cookie-container"] button[class*="decline"],\ div[class*="cookie-container"] button[class*="settings"],\ div[id*="cookie-container"] button[class*="reject"],\ div[id*="cookie-container"] button[class*="decline"],\ div[id*="cookie-container"] button[class*="settings"]', '[data-purpose*="cookie"] button[data-purpose*="reject"],\ [data-purpose*="cookie"] button[data-purpose*="decline"],\ [data-purpose*="cookie"] button[data-purpose*="settings"],\ [data-ref*="cookie"] button[data-ref*="reject"],\ [data-ref*="cookie"] button[data-ref*="decline"],\ [data-ref*="cookie"] button[data-ref*="settings"]', '[id*="cookie-manager"] button[id*="reject"],\ [id*="cookie-manager"] button[id*="decline"],\ [id*="cookie-manager"] button[id*="settings"],\ [id*="cookie-control"] button[id*="reject"],\ [id*="cookie-control"] button[id*="decline"],\ [id*="cookie-control"] button[id*="settings"]', ]; let currentChainElement = 0; const classname = Math.random() .toString(36) .replace(/[^a-z]+/g, ''); // Search loop function let searchGroupsLength = searchGroups.length, searchPairsKeys = Object.keys(searchPairs), searchPairsJoinedKeys = searchPairsKeys.join(','), timeoutDuration = 300; function querySelectorAllShadowRoot(selector, root = document) { const elements = []; const findElements = node => { if (node.shadowRoot) { node.shadowRoot.querySelectorAll(selector).forEach(el => elements.push(el)); node.shadowRoot.querySelectorAll('*').forEach(findElements); } }; root.querySelectorAll('*').forEach(findElements); return elements; } function searchLoop(counter) { if (document.cookie.indexOf('cookie_consent') !== -1) { return; } const dynamicTimeout = Math.min(timeoutDuration * (counter + 1), 2000); setTimeout(function () { document.querySelectorAll(searchPairsJoinedKeys).forEach(function (box) { searchPairsKeys.forEach(function (selector) { if (box.matches(selector)) { const shadowElements = querySelectorAllShadowRoot(searchPairs[selector].join(','), box); shadowElements.forEach(button => { if (button.click && !button.classList.contains(classname)) { button.classList.add(classname); if (typeof chrome == 'object' && chrome.runtime) chrome.runtime.sendMessage({ command: 'cookie_warning_dismissed', url: document.location.href }); button.click(); if (selector != '.message-container' && button.getAttribute('href') != '#cookieman-settings') setTimeout(function () { if (button) button.click(); }, 500); timeoutDuration += 500; } }); } }); }); document.querySelectorAll(searchGroups[counter % searchGroupsLength]).forEach(function (element) { if (element.click && !element.classList.contains(classname)) { element.classList.add(classname); if (typeof chrome == 'object' && chrome.runtime) chrome.runtime.sendMessage({ command: 'cookie_warning_dismissed', url: document.location.href }); element.click(); if (element.getAttribute('aria-pressed') != 'true') setTimeout(function () { if (element) element.click(); }, 500); timeoutDuration += 500; } }); if (counter < 100 * searchGroupsLength) { searchLoop(counter + 1); } }, dynamicTimeout); } // Embeds handling function handleEmbeds() { var l = document.location, is_audioboom = false, is_dailymotion = false, is_dailybuzz = false, is_playerclipslaliga = false; switch (l.hostname) { case 'embeds.audioboom.com': is_audioboom = true; break; case 'dailymotion.com': case 'www.dailymotion.com': is_dailymotion = l.pathname.indexOf('/embed') === 0; break; case 'geo.dailymotion.com': is_dailymotion = l.pathname.indexOf('/player') === 0; break; case 'dailybuzz.nl': is_dailybuzz = l.pathname.indexOf('/buzz/embed') === 0; break; case 'playerclipslaliga.tv': is_playerclipslaliga = true; break; } function searchEmbeds() { setTimeout(function () { if (is_audioboom) { document.querySelectorAll('div[id^="cookie-modal"] .modal[style*="block"] .btn.mrs:not(.' + classname + ')').forEach(function (button) { button.className += ' ' + classname; button.click(); }); } else if (is_dailymotion) { document.querySelectorAll('.np_DialogConsent-accept:not(.' + classname + '), .consent_screen-accept:not(.' + classname + ')').forEach(function (button) { button.className += ' ' + classname; button.click(); }); } else if (is_dailybuzz) { document.querySelectorAll('#ask-consent #accept:not(.' + classname + ')').forEach(function (button) { button.className += ' ' + classname; button.click(); }); } else if (is_playerclipslaliga) { document.querySelectorAll('#cookies button[onclick*="saveCookiesSelection"]:not(.' + classname + ')').forEach(function (button) { button.className += ' ' + classname; button.click(); }); } else { return; } searchEmbeds(); }, 1000); } searchEmbeds(); } // Initialize var start = setInterval(function () { var html = document.querySelector('html'); if (!html || /idc0_350/.test(html.className)) return; clearInterval(start); html.className += ' idc0_350'; searchLoop(0); handleEmbeds(); }, 500); var hostname = document.location.hostname.replace(/^w{2,3}\d*\./i, ''), items = getItem(hostname); if (items) { (items instanceof Array ? items : [items]).forEach(function (item) { let value = localStorage.getItem(item.key); if (value == null || (item.strict && value != item.value)) { localStorage.setItem(item.key, item.value); counter++; } }); if (counter > 0) document.location.reload(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址