🏠 返回首頁 

Greasy Fork is available in English.

Я не забочусь о куки

Автоматическое принятие cookie и удаление надоедливых всплывающих окон

  1. // ==UserScript==
  2. // @name I don't care about cookies
  3. // @name:vi Tôi không quan tâm về cookie
  4. // @name:zh-CN 我不关心cookie
  5. // @name:zh-TW 我不關心cookie
  6. // @name:ja クッキーについては気にしない
  7. // @name:ru Я не забочусь о куки
  8. // @namespace http://tampermonkey.net/
  9. // @version 2025.01.03.2
  10. // @description Remove cookie warnings from almost all websites! Auto accept cookies and remove annoying cookie popups
  11. // @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
  12. // @description:zh-CN 自动接受cookie并移除烦人的cookie弹窗
  13. // @description:zh-TW 自動接受cookie並移除煩人的cookie彈窗
  14. // @description:ru Автоматическое принятие cookie и удаление надоедливых всплывающих окон
  15. // @description:ja 自動承認cookieと迷惑なポップアップを削除
  16. // @author Yuusei
  17. // @match *://*/*
  18. // @grant none
  19. // @icon https://lh3.googleusercontent.com/sCLTYpGX0VcVootQ_XaFQ9saRIhVWu79ngSzY5eTZ5evRpJ_Q27OdvxA4RrOoZXP7Q4enFh-u6VhxObcJLfARw1g=s60
  20. // @compatible chrome
  21. // @compatible edge
  22. // @compatible firefox
  23. // @compatible safari
  24. // @run-at document-start
  25. // @license gpl-3.0-only
  26. // ==/UserScript==
  27. (function () {
  28. 'use strict';
  29. const CONSENT_TEXTS = {
  30. en: ['accept', 'accept all', 'agree', 'continue', 'got it', 'reject all', 'decline', 'necessary only', 'required only', 'manage', 'customize'],
  31. 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', 'tôi chấp nhận', 'đồng ý tất cả', 'chấp nhận và tiếp tục', 'cho phép tất cả'],
  32. zh: ['接受', '接受全部', '同意', '继续', '拒绝全部', '拒绝', '仅必要', '管理', '自定义'],
  33. ru: ['принять', 'принять все', 'согласен', 'продолжить', 'отклонить все', 'отклонить', 'только необходимые', 'настроить', 'управлять'],
  34. ja: ['承認', '同意', '続ける', 'すべて拒否', '拒否', '必要のみ', 'カスタマイズ', '管理'],
  35. de: ['akzeptieren', 'einverstanden', 'fortfahren', 'alle ablehnen', 'ablehnen', 'nur notwendige', 'anpassen', 'verwalten'],
  36. fr: ['accepter', 'accepter tout', 'accepte', 'continuer', 'tout refuser', 'refuser', 'uniquement nécessaire', 'personnaliser', 'gérer'],
  37. es: ['aceptar', 'acepto todo', 'acepto', 'continuar', 'rechazar todo', 'rechazar', 'solo necesario', 'personalizar', 'gestionar'],
  38. it: ['accetta', 'accetto tutto', 'accetto', 'continua', 'rifiuta tutto', 'rifiuta', 'solo necessari', 'personalizza', 'gestisci'],
  39. pl: ['akceptuj', 'akceptuj wszystko', 'zgadzam się', 'kontynuuj', 'odrzuć wszystko', 'odrzuć', 'tylko niezbędne', 'dostosuj', 'zarządzaj'],
  40. nl: ['accepteren', 'accepteren', 'doorgaan', 'alles weigeren', 'weigeren', 'alleen noodzakelijk', 'aanpassen', 'beheren'],
  41. ko: ['동의', '모두 동의', '계속하기', '모두 거부', '거부', '필수만', '설정', '관리'],
  42. th: ['ยอมรับ', 'ยอมรับทั้งหมด', 'ตกลง', 'ปฏิเสธทั้งหมด', 'ปฏิเสธ', 'จำเป็นเท่านั้น', 'ตั้งค่า', 'จัดการ'],
  43. id: ['setuju', 'setuju semua', 'lanjutkan', 'tolak semua', 'tolak', 'wajib saja', 'pengaturan', 'kelola'],
  44. ms: ['terima', 'terima semua', 'teruskan', 'tolak semua', 'tolak', 'perlu sahaja', 'tetapan', 'urus'],
  45. pt: ['aceitar', 'aceitar tudo', 'continuar', 'rejeitar tudo', 'rejeitar', 'necessário', 'configurar', 'gerir'],
  46. sv: ['godkänn', 'godkänn alla', 'fortsätt', 'neka alla', 'neka', 'nödvändiga', 'inställningar', 'hantera'],
  47. da: ['accepter', 'accepter alle', 'fortsæt', 'afvis alle', 'afvis', 'nødvendige', 'indstillinger', 'administrer'],
  48. fi: ['hyväksy', 'hyväksy kaikki', 'jatka', 'hylkää kaikki', 'hylkää', 'välttämätön', 'asetukset', 'hallitse'],
  49. 'zh-CN': ['接受', '接受全部', '同意', '继续', '我同意', '确定', '确认', '知道了', '好的', '拒绝全部', '拒绝', '仅必要', '设置', '自定义', '管理', '保存设置', '允许', '允许全部', '接受并继续', '同意并继续', '保存并继续'],
  50. 'zh-TW': ['接受', '接受全部', '同意', '繼續', '我同意', '確定', '確認', '知道了', '好的', '拒絕全部', '拒絕', '僅必要', '設置', '自定義', '管理', '保存設置', '允許', '允許全部', '接受並繼續', '同意並繼續', '保存並繼續'],
  51. ko: ['동의', '모두 동의', '수락', '계속하기', '확인', '거부', '거부하기', '필수만', '설정', '관리', '저장', '허용', '모두 허용'],
  52. th: ['ยอมรับ', 'ยอมรับทั้งหมด', 'ตกลง', 'ดำเนินการต่อ', 'ปฏิเสธ', 'ปฏิเสธทั้งหมด', 'จำเป็นเท่านั้น', 'ตั้งค่า', 'จัดการ', 'บันทึก', 'อนุญาต', 'อนุญาตทั้งหมด'],
  53. id: ['terima', 'terima semua', 'setuju', 'lanjutkan', 'tolak', 'tolak semua', 'wajib saja', 'pengaturan', 'kelola', 'simpan', 'izinkan', 'izinkan semua'],
  54. ms: ['terima', 'terima semua', 'setuju', 'teruskan', 'tolak', 'tolak semua', 'perlu sahaja', 'tetapan', 'urus', 'simpan', 'benarkan', 'benarkan semua'],
  55. };
  56. function matchesConsentText(element) {
  57. const text = element.textContent.toLowerCase();
  58. const lang = document.documentElement.lang || 'en';
  59. const texts = CONSENT_TEXTS[lang.split('-')[0]] || CONSENT_TEXTS['en'];
  60. return texts.some(t => text.includes(t));
  61. }
  62. // Utility functions
  63. function _sl(selector, container) {
  64. return (container || document).querySelector(selector);
  65. }
  66. function _id(id) {
  67. return document.getElementById(id);
  68. }
  69. function _ev(selector, container, full) {
  70. return document.evaluate((typeof full == 'undefined' ? '//' : '') + selector, container || document, null, XPathR###lt.ANY_TYPE, null).iterateNext();
  71. }
  72. function _if(condition, ...selectors) {
  73. return _sl(condition) ? _chain(...selectors) : false;
  74. }
  75. function _if_else(condition, if_selectors, else_selectors) {
  76. if (_sl(condition)) return _chain(...if_selectors);
  77. return _chain(...else_selectors);
  78. }
  79. function _chain(...selectors) {
  80. let elements,
  81. l = selectors.length;
  82. let flagUnique = false,
  83. flagOptional = false,
  84. flagAllMatches = false;
  85. for (let i = currentChainElement; i < l; i++) {
  86. if (/^FLAG\:/.test(selectors[i])) {
  87. selectors[i]
  88. .split(':')[1]
  89. .split(',')
  90. .forEach(function (flag) {
  91. if (flag == 'UNIQUE') flagUnique = true;
  92. else if (flag == 'OPTIONAL') flagOptional = true;
  93. else if (flag == 'REQUIRED') flagOptional = false;
  94. else if (flag == 'ALL-MATCHES') flagAllMatches = true;
  95. else if (flag == 'SINGLE-MATCH') flagAllMatches = false;
  96. });
  97. continue;
  98. }
  99. if (flagUnique) selectors[i] += selectors[i].startsWith('//') ? '[not(contains(@class, "' + classname + '"))]' : ':not(.' + classname + ')';
  100. if (i == l - 1) return selectors[i];
  101. elements = _sl(selectors[i], false, flagAllMatches);
  102. if (!flagAllMatches) elements = elements ? [elements] : [];
  103. if (!elements.length) {
  104. if (flagOptional) {
  105. currentChainElement++;
  106. continue;
  107. }
  108. return false;
  109. }
  110. currentChainElement++;
  111. elements.forEach(function (element) {
  112. if (flagUnique) element.classList.add(classname);
  113. if (element.nodeName == 'OPTION') element.selected = true;
  114. else element.click();
  115. });
  116. }
  117. return false;
  118. }
  119. function getItem(hostname) {
  120. switch (hostname) {
  121. case 'youtube.com':
  122. case 'www.youtube.com':
  123. return { strict: true, key: 'CONSENT', value: 'PENDING+999' };
  124. case 'google.com':
  125. case 'www.google.com':
  126. return { strict: true, key: 'CONSENT', value: 'YES+' };
  127. case 'twitter.com':
  128. case 'www.twitter.com':
  129. return { strict: false, key: 'twtr_cookie_consent', value: '1' };
  130. case 'pepephone.com':
  131. case 'lyricsbox.com':
  132. return { strict: true, key: 'cookieconsent', value: '1111' };
  133. case 'kontaktbazar.at':
  134. case 'hoernews.de':
  135. return { strict: false, key: 'cookieconsent_status', value: 'dismiss' };
  136. case 'vodafoneziggo.nl':
  137. return { strict: false, key: 'cookies-accepted', value: 'true' };
  138. case 'frankfurt.de':
  139. return { strict: false, key: 'cookieAccepted', value: 'needed---piwik' };
  140. case 'hackerrank.com':
  141. return { strict: false, key: 'show_cookie_banner', value: 'false' };
  142. case 'facebook.com':
  143. case 'www.facebook.com':
  144. return { strict: true, key: 'datr', value: 'accepted' };
  145. case 'instagram.com':
  146. case 'www.instagram.com':
  147. return { strict: true, key: 'ig_did', value: 'accepted' };
  148. case 'linkedin.com':
  149. case 'www.linkedin.com':
  150. return { strict: false, key: 'lidc', value: 'accepted' };
  151. case 'reddit.com':
  152. case 'www.reddit.com':
  153. return { strict: false, key: 'eu_cookie', value: '{"opted":true}' };
  154. case 'tiktok.com':
  155. case 'www.tiktok.com':
  156. return { strict: true, key: 'tt_webid', value: 'accepted' };
  157. case 'netflix.com':
  158. case 'www.netflix.com':
  159. return { strict: false, key: 'netflix-cookie-consent', value: 'accepted' };
  160. case 'spotify.com':
  161. case 'www.spotify.com':
  162. return { strict: false, key: 'sp_dc', value: 'accepted' };
  163. case 'amazon.com':
  164. case 'www.amazon.com':
  165. return { strict: false, key: 'amazon-cookie-consent', value: 'accepted' };
  166. case 'pinterest.com':
  167. case 'www.pinterest.com':
  168. return { strict: false, key: '_pinterest_sess', value: 'accepted' };
  169. case 'twitch.tv':
  170. case 'www.twitch.tv':
  171. return { strict: false, key: 'twitch_cookie_consent', value: 'accepted' };
  172. case 'github.com':
  173. case 'www.github.com':
  174. return { strict: false, key: '_gh_sess', value: 'accepted' };
  175. case 'medium.com':
  176. case 'www.medium.com':
  177. return { strict: false, key: 'medium_cookie_consent', value: 'accepted' };
  178. case 'quora.com':
  179. case 'www.quora.com':
  180. return { strict: false, key: 'm-b', value: 'accepted' };
  181. case 'stackoverflow.com':
  182. case 'www.stackoverflow.com':
  183. return { strict: false, key: 'acct', value: 'accepted' };
  184. case 'microsoft.com':
  185. case 'www.microsoft.com':
  186. return { strict: false, key: 'MUID', value: 'accepted' };
  187. case 'apple.com':
  188. case 'www.apple.com':
  189. return { strict: false, key: 'geo', value: 'accepted' };
  190. case 'dropbox.com':
  191. case 'www.dropbox.com':
  192. return { strict: false, key: 'dbx-consent', value: 'accepted' };
  193. case 'booking.com':
  194. case 'www.booking.com':
  195. return { strict: false, key: 'bkng_consent', value: 'accepted' };
  196. case 'vnexpress.net':
  197. case 'www.vnexpress.net':
  198. return { strict: false, key: 'vnexpress_cookie_consent', value: 'accepted' };
  199. case 'thanhnien.vn':
  200. case 'www.thanhnien.vn':
  201. return { strict: false, key: 'thanhnien_cookie', value: 'accepted' };
  202. case 'tuoitre.vn':
  203. case 'www.tuoitre.vn':
  204. return { strict: false, key: 'tuoitre_cookie', value: 'accepted' };
  205. case 'tiki.vn':
  206. case 'www.tiki.vn':
  207. return { strict: false, key: 'tiki_cookie', value: 'accepted' };
  208. case 'shopee.vn':
  209. case 'www.shopee.vn':
  210. return { strict: false, key: 'shopee_cookie', value: 'accepted' };
  211. case 'lazada.vn':
  212. case 'www.lazada.vn':
  213. return { strict: false, key: 'lzd_cookie', value: 'accepted' };
  214. case 'sendo.vn':
  215. case 'www.sendo.vn':
  216. return { strict: false, key: 'sendo_cookie', value: 'accepted' };
  217. case 'thegioididong.com':
  218. case 'www.thegioididong.com':
  219. return { strict: false, key: 'tgdd_cookie', value: 'accepted' };
  220. case 'fptshop.com.vn':
  221. case 'www.fptshop.com.vn':
  222. return { strict: false, key: 'fpt_cookie', value: 'accepted' };
  223. case 'cellphones.com.vn':
  224. case 'www.cellphones.com.vn':
  225. return { strict: false, key: 'cps_cookie', value: 'accepted' };
  226. case 'aliexpress.com':
  227. case 'www.aliexpress.com':
  228. return { strict: false, key: 'aep_usuc_f', value: 'accepted' };
  229. case 'ebay.com':
  230. case 'www.ebay.com':
  231. return { strict: false, key: 'ebay_cookie_consent', value: 'accepted' };
  232. case 'coursera.org':
  233. case 'www.coursera.org':
  234. return { strict: false, key: 'coursera_cookie', value: 'accepted' };
  235. case 'udemy.com':
  236. case 'www.udemy.com':
  237. return { strict: false, key: 'ud_cookie', value: 'accepted' };
  238. case 'bachhoaxanh.com':
  239. case 'www.bachhoaxanh.com':
  240. return { strict: false, key: 'bhx_cookie', value: 'accepted' };
  241. case 'dienmayxanh.com':
  242. case 'www.dienmayxanh.com':
  243. return { strict: false, key: 'dmx_cookie', value: 'accepted' };
  244. case 'nguyenkim.com':
  245. case 'www.nguyenkim.com':
  246. return { strict: false, key: 'nk_cookie', value: 'accepted' };
  247. case 'dantri.com.vn':
  248. case 'www.dantri.com.vn':
  249. return { strict: false, key: 'dantri_cookie', value: 'accepted' };
  250. case 'vietnamnet.vn':
  251. case 'www.vietnamnet.vn':
  252. return { strict: false, key: 'vietnamnet_cookie', value: 'accepted' };
  253. case '24h.com.vn':
  254. case 'www.24h.com.vn':
  255. return { strict: false, key: '24h_cookie', value: 'accepted' };
  256. case 'vietcombank.com.vn':
  257. case 'www.vietcombank.com.vn':
  258. return { strict: false, key: 'vcb_cookie', value: 'accepted' };
  259. case 'techcombank.com.vn':
  260. case 'www.techcombank.com.vn':
  261. return { strict: false, key: 'tcb_cookie', value: 'accepted' };
  262. case 'mbbank.com.vn':
  263. case 'www.mbbank.com.vn':
  264. return { strict: false, key: 'mb_cookie', value: 'accepted' };
  265. case 'amazon.co.jp':
  266. case 'www.amazon.co.jp':
  267. return { strict: false, key: 'amazon_jp_cookie', value: 'accepted' };
  268. case 'rakuten.co.jp':
  269. case 'www.rakuten.co.jp':
  270. return { strict: false, key: 'rakuten_jp_cookie', value: 'accepted' };
  271. case 'taobao.com':
  272. case 'www.taobao.com':
  273. return { strict: false, key: 'taobao_cookie', value: 'accepted' };
  274. case 'line.me':
  275. case 'www.line.me':
  276. return { strict: false, key: 'line_cookie', value: 'accepted' };
  277. case 'weibo.com':
  278. case 'www.weibo.com':
  279. return { strict: false, key: 'weibo_cookie', value: 'accepted' };
  280. case 'kakao.com':
  281. case 'www.kakao.com':
  282. return { strict: false, key: 'kakao_cookie', value: 'accepted' };
  283. case 'yahoo.co.jp':
  284. case 'www.yahoo.co.jp':
  285. return { strict: false, key: 'yahoo_jp_cookie', value: 'accepted' };
  286. case 'naver.com':
  287. case 'www.naver.com':
  288. return { strict: false, key: 'naver_cookie', value: 'accepted' };
  289. case 'baidu.com':
  290. case 'www.baidu.com':
  291. return { strict: false, key: 'baidu_cookie', value: 'accepted' };
  292. case 'zalando.com':
  293. case 'www.zalando.com':
  294. return { strict: false, key: 'zalando_cookie', value: 'accepted' };
  295. case 'asos.com':
  296. case 'www.asos.com':
  297. return { strict: false, key: 'asos_cookie', value: 'accepted' };
  298. case 'zara.com':
  299. case 'www.zara.com':
  300. return { strict: false, key: 'zara_cookie', value: 'accepted' };
  301. case 'tmall.com':
  302. case 'www.tmall.com':
  303. return { strict: false, key: 'tmall_cookie', value: 'accepted' };
  304. case 'jd.com':
  305. case 'www.jd.com':
  306. return { strict: false, key: 'jd_cookie', value: 'accepted' };
  307. case 'sina.com.cn':
  308. case 'www.sina.com.cn':
  309. return { strict: false, key: 'sina_cookie', value: 'accepted' };
  310. case 'qq.com':
  311. case 'www.qq.com':
  312. return { strict: false, key: 'qq_cookie', value: 'accepted' };
  313. case '163.com':
  314. case 'www.163.com':
  315. return { strict: false, key: 'netease_cookie', value: 'accepted' };
  316. case 'sohu.com':
  317. case 'www.sohu.com':
  318. return { strict: false, key: 'sohu_cookie', value: 'accepted' };
  319. case 'bilibili.com':
  320. case 'www.bilibili.com':
  321. return { strict: false, key: 'bilibili_cookie', value: 'accepted' };
  322. }
  323. const parts = hostname.split('.');
  324. if (parts.length > 2) {
  325. parts.shift();
  326. return getItem(parts.join('.'));
  327. }
  328. return false;
  329. }
  330. function _parent(element) {
  331. if (element && element.parentNode) return element.parentNode;
  332. return false;
  333. }
  334. function _iframe(iframe_selector, selector) {
  335. var e = _sl(iframe_selector);
  336. return e ? _sl(selector, e.contentDocument || e.contentWindow.contentDocument) : e;
  337. }
  338. // Cookie consent handling logic
  339. let searchPairs = {
  340. '.vn-cookie-banner': ['.vn-cookie-banner__reject', '.vn-cookie-banner__customize'],
  341. '.vn-cookie-notice': ['.vn-cookie-notice__reject', '.vn-cookie-notice__settings'],
  342. '.vn-cookie-consent': ['.vn-cookie-consent__reject', '.vn-cookie-consent__customize'],
  343. '.vn-cookie-popup': ['.vn-cookie-popup__reject', '.vn-cookie-popup__settings'],
  344. '.shopee-cookie-banner': ['.shopee-cookie-banner__reject', '.shopee-cookie-banner__settings'],
  345. '.lazada-cookie-notice': ['.lazada-cookie-notice__reject', '.lazada-cookie-notice__settings'],
  346. '.tiki-cookie-popup': ['.tiki-cookie-popup__reject', '.tiki-cookie-popup__settings'],
  347. '.sendo-cookie-consent': ['.sendo-cookie-consent__reject', '.sendo-cookie-consent__settings'],
  348. '.vnexpress-cookie': ['.vnexpress-cookie__reject', '.vnexpress-cookie__settings'],
  349. '.tuoitre-cookie': ['.tuoitre-cookie__reject', '.tuoitre-cookie__settings'],
  350. '.thanhnien-cookie': ['.thanhnien-cookie__reject', '.thanhnien-cookie__settings'],
  351. '.dantri-cookie': ['.dantri-cookie__reject', '.dantri-cookie__settings'],
  352. '.tgdd-cookie-notice': ['.tgdd-cookie-notice__reject', '.tgdd-cookie-notice__settings'],
  353. '.fpt-cookie-popup': ['.fpt-cookie-popup__reject', '.fpt-cookie-popup__settings'],
  354. '.cps-cookie-consent': ['.cps-cookie-consent__reject', '.cps-cookie-consent__settings'],
  355. '.vcb-cookie-notice': ['.vcb-cookie-notice__reject', '.vcb-cookie-notice__settings'],
  356. '.tcb-cookie-popup': ['.tcb-cookie-popup__reject', '.tcb-cookie-popup__settings'],
  357. '.mb-cookie-consent': ['.mb-cookie-consent__reject', '.mb-cookie-consent__settings'],
  358. 'div[class*="consent"]': ['button[class*="reject"]', 'button[class*="decline"]', 'button[class*="settings"]'],
  359. 'div[class*="notice"]': ['button[class*="reject"]', 'button[class*="decline"]', 'button[class*="settings"]'],
  360. 'div[class*="popup"]': ['button[class*="reject"]', 'button[class*="decline"]', 'button[class*="settings"]'],
  361. 'div[class*="banner"]': ['button[class*="reject"]', 'button[class*="decline"]', 'button[class*="settings"]'],
  362. };
  363. let searchGroups = [
  364. '.qc-cmp2-summary-buttons button[mode="secondary"],\
  365. .qc-cmp2-buttons-desktop > button:first-child,\
  366. #didomi-popup .didomi-button-highlight:not([class*="paywall"]):not([class*="disagree"]),\
  367. #rgpd_video .rgpd-mask a[data-rgpd-consent],\
  368. .cli-barmodal-open #wt-cli-privacy-save-btn,\
  369. .js--modal[style*="block"] .cookie-permission--accept-button,\
  370. .gdpr-modal-rider .btn-cookieaccept,\
  371. .js-cookiewall #sel-test-accept-cookies-button,\
  372. #mpo[style*="block"] .submit.modal-privacy__btn[onclick*="privacyframe.accept"],\
  373. .lightbox--cookie-consent .btn-cta,\
  374. .lightbox.cookie-consent .cookie-consent-button-decline,\
  375. .js-modal-gdpr.is-active .btn[data-level="2"],\
  376. #CybotCookiebotDialogBodyLevelButtonLevelOptinAllowallSelection,\
  377. #cookieNotificationModal.in .btn.accept-cookie,\
  378. .has-ccwindow .cc-compliance .cc-dismiss,\
  379. .ds2-cookie-disclaimer--slidedown .ds2-cookie-disclaimer-js--submit,\
  380. #mdlCookieCompliance.in .cookieClose,\
  381. #cookieModal.in .js-acceptDefaultCookie,\
  382. .c-cookiebutton .c-cookiebutton__close,\
  383. #normativa_cookies.in .btn,\
  384. #cookiewall.in .btn-primary,\
  385. .outerCookieBar .EuCookieBar__cookieButton,\
  386. #TOS-POPUP .rhododendron-popup__button--agree,\
  387. #cookie-wall #accept-cookies,\
  388. #popup-wrapper .button[href*="/cookies.consent.php"],\
  389. .reveal.cookies[style*="block"] button[click*="aceptaCookies"],\
  390. .mnd-cookie-modal[style*="block"] .btn.is--primary,\
  391. .cookieHandler.cookieHandler--modalOpen #acceptAllCookies,\
  392. .gdpr-modal--active .btn--primary,\
  393. #dpi-banner:not(.hidden) #btn-agree-cookie,\
  394. .gh-banner.gh-banner-active #gh-cookiebanner-close,\
  395. #mrktpref.notification-bar .btn-success,\
  396. #PopinGDPRCookie[style*="block"] .jsbd-popin-ok,\
  397. #modal-rodo.in .btn-primary,\
  398. .cookie-compliance-modal.in .btn-primary,\
  399. .cookieconsent.show .btn[data-dm*="accept"],\
  400. .cookie-wall-modal.in .btn.ja,\
  401. #modal-consent.in .modal-consent-accept,\
  402. .rodo #cookies.in .btn-primary,\
  403. .js-cookie-alert.in .js-cookie-alert-accept,\
  404. #modal_gdpr_intro_popup.in #gdpr-modal-btn-ok-agree,\
  405. #consentButtonContainer > button[onclick*="sendAndRedirect"],\
  406. #eu-consent[style*="block"] .btn.yes,\
  407. .modal--gdpr.is-open .js-gdpr-consent,\
  408. #cookiePopupModal.in .cookiepopup-agreed,\
  409. .polityka-cookie-rodo[style*="block"] .button-zgoda,\
  410. .ui-dialog.consent-modal[style*="block"] .js-btn-agree,\
  411. #up-cookie.active .button[onclick*="setCookiePreference"],\
  412. .RodoModal.in .close,\
  413. .consent-popup form[action*="cookie-consent"] .consent-popup__button,\
  414. #consent form[action*="cookie-consent"] .one-btn,\
  415. #cookiewall-wrapper .button[href*="accept"],\
  416. #cookieChoiceButtonAccept,\
  417. .mod-cookie-consent[style*="block"] .btn-all-cookies,\
  418. .c-layer--consent .layer-button--accept,\
  419. .button.button-ok[onclick*="acceptAVG"],\
  420. #meredithGdprConsentFormButton,\
  421. #advanced-cookie-modal.in .cookie-accept,\
  422. .show-modal .cookie-settings-manager-container .initial-dialog .js-accept-button,\
  423. .cookie-settings-manager-container .initial-dialog[style*="block"] .js-accept-button,\
  424. .gdprLightbox[data-module="gdprLightbox"] ._type_gdpr_agree,\
  425. .cookie.showa #Row1_Column1_Cell1_CookieSettings_AdvancedSaveAccept,\
  426. #core-cookie-container[style*="block"] .btn--agree,\
  427. .cookie-consent-modal._show .action-primary,\
  428. #dsgvoModal.show #dsvgo-banner__button,\
  429. .basicLightbox--visible #accept-all-gdpr,\
  430. #gdpr-modal.in .gdpr-modal__btn--accept,\
  431. .cookiehint .btn.cookieagree,\
  432. #cookiealert .modal.in .btn[href*="accept"],\
  433. #lml-data-consent-accept,\
  434. #CBCookieMsg.in .btn[onclick*="approveCookies"],\
  435. #cookiewall-container .button[name="submit"],\
  436. #cookie_disclaimer.in .cookie_disclaimer_button,\
  437. .m-cookie.iziModal[style*="block"] .m-cookie__save2.button,\
  438. kamino-cookie-policy .mat-raised-button,\
  439. #surbma-gpga-modal[style*="block"] button,\
  440. #GDPR.overlayBox .menuButton,\
  441. #cookiebar .cookie-selection-button.accept,\
  442. .modal.in .btn.close-modal-cookie,\
  443. #consent-module[style*="block"] #consent-module-text-button,\
  444. .modal #consentButton,\
  445. #consent-modal[style*="block"] .lm_modal__modal__content__body__buttons__ok,\
  446. .cookiesOverlay3Box #cookiesConsentOK,\
  447. .bemCookieOverlay--activePopup .bemCookieOverlay__btn--save,\
  448. #root main ~ div [data-gi-selector="reject-all-cookies"] ~ div a,\
  449. .cookies-management .cookies-deny,\
  450. .offcanvas.is-open .js-offcanvas-cookie-submit,\
  451. .force--consent.show--consent #cs_save__btn,\
  452. .force--consent.show--consent #s-sv-bn,\
  453. #cookieNoticeModal.vrm-reveal[style*="block"] .vrm-reveal__icon--close',
  454. '.cookie-banner .cookie-banner__buttons .cookie-banner__button--reject,\
  455. .cookie-consent-banner .cookie-consent-banner__reject,\
  456. .cookie-notification .cookie-notification__buttons .cookie-notification__reject,\
  457. .cookie-policy-banner .cookie-policy-banner__buttons .cookie-policy-banner__reject,\
  458. .cookie-warning .cookie-warning__buttons .cookie-warning__reject,\
  459. .cookie-notice .cookie-notice__buttons .cookie-notice__reject,\
  460. .cookie-alert .cookie-alert__buttons .cookie-alert__reject,\
  461. .cookie-popup .cookie-popup__buttons .cookie-popup__reject,\
  462. .cookie-modal .cookie-modal__buttons .cookie-modal__reject,\
  463. .cookie-dialog .cookie-dialog__buttons .cookie-dialog__reject,\
  464. .gdpr-banner .gdpr-banner__buttons .gdpr-banner__reject,\
  465. .gdpr-modal .gdpr-modal__buttons .gdpr-modal__reject,\
  466. .gdpr-notice .gdpr-notice__buttons .gdpr-notice__reject,\
  467. .gdpr-popup .gdpr-popup__buttons .gdpr-popup__reject,\
  468. .gdpr-dialog .gdpr-dialog__buttons .gdpr-dialog__reject,\
  469. .privacy-banner .privacy-banner__buttons .privacy-banner__reject,\
  470. .privacy-modal .privacy-modal__buttons .privacy-modal__reject,\
  471. .privacy-notice .privacy-notice__buttons .privacy-notice__reject,\
  472. .privacy-popup .privacy-popup__buttons .privacy-popup__reject,\
  473. .privacy-dialog .privacy-dialog__buttons .privacy-dialog__reject',
  474. '.consent-banner .consent-banner__buttons .consent-banner__reject,\
  475. .consent-modal .consent-modal__buttons .consent-modal__reject,\
  476. .consent-notice .consent-notice__buttons .consent-notice__reject,\
  477. .consent-popup .consent-popup__buttons .consent-popup__reject,\
  478. .consent-dialog .consent-dialog__buttons .consent-dialog__reject,\
  479. .tracking-banner .tracking-banner__buttons .tracking-banner__reject,\
  480. .tracking-modal .tracking-modal__buttons .tracking-modal__reject,\
  481. .tracking-notice .tracking-notice__buttons .tracking-notice__reject,\
  482. .tracking-popup .tracking-popup__buttons .tracking-popup__reject,\
  483. .tracking-dialog .tracking-dialog__buttons .tracking-dialog__reject',
  484. '.cookie-settings-modal .cookie-settings__reject,\
  485. .cookie-settings-modal .cookie-settings__customize,\
  486. .cookie-preferences-modal .cookie-preferences__reject,\
  487. .cookie-preferences-modal .cookie-preferences__customize,\
  488. .cookie-manager-modal .cookie-manager__reject,\
  489. .cookie-manager-modal .cookie-manager__customize,\
  490. .cookie-control-modal .cookie-control__reject,\
  491. .cookie-control-modal .cookie-control__customize,\
  492. .cookie-options-modal .cookie-options__reject,\
  493. .cookie-options-modal .cookie-options__customize',
  494. '.data-privacy-modal .data-privacy__reject,\
  495. .data-privacy-modal .data-privacy__customize,\
  496. .data-protection-modal .data-protection__reject,\
  497. .data-protection-modal .data-protection__customize,\
  498. .data-consent-modal .data-consent__reject,\
  499. .data-consent-modal .data-consent__customize,\
  500. .data-settings-modal .data-settings__reject,\
  501. .data-settings-modal .data-settings__customize,\
  502. .data-preferences-modal .data-preferences__reject,\
  503. .data-preferences-modal .data-preferences__customize',
  504. '.privacy-manager-modal .privacy-manager__reject,\
  505. .privacy-manager-modal .privacy-manager__customize,\
  506. .privacy-settings-modal .privacy-settings__reject,\
  507. .privacy-settings-modal .privacy-settings__customize,\
  508. .privacy-options-modal .privacy-options__reject,\
  509. .privacy-options-modal .privacy-options__customize,\
  510. .privacy-control-modal .privacy-control__reject,\
  511. .privacy-control-modal .privacy-control__customize,\
  512. .privacy-preferences-modal .privacy-preferences__reject,\
  513. .privacy-preferences-modal .privacy-preferences__customize',
  514. '.consent-manager-modal .consent-manager__reject,\
  515. .consent-manager-modal .consent-manager__customize,\
  516. .consent-settings-modal .consent-settings__reject,\
  517. .consent-settings-modal .consent-settings__customize,\
  518. .consent-options-modal .consent-options__reject,\
  519. .consent-options-modal .consent-options__customize,\
  520. .consent-control-modal .consent-control__reject,\
  521. .consent-control-modal .consent-control__customize,\
  522. .consent-preferences-modal .consent-preferences__reject,\
  523. .consent-preferences-modal .consent-preferences__customize',
  524. '.tracking-manager-modal .tracking-manager__reject,\
  525. .tracking-manager-modal .tracking-manager__customize,\
  526. .tracking-settings-modal .tracking-settings__reject,\
  527. .tracking-settings-modal .tracking-settings__customize,\
  528. .tracking-options-modal .tracking-options__reject,\
  529. .tracking-options-modal .tracking-options__customize,\
  530. .tracking-control-modal .tracking-control__reject,\
  531. .tracking-control-modal .tracking-control__customize,\
  532. .tracking-preferences-modal .tracking-preferences__reject,\
  533. .tracking-preferences-modal .tracking-preferences__customize',
  534. '.gdpr-manager-modal .gdpr-manager__reject,\
  535. .gdpr-manager-modal .gdpr-manager__customize,\
  536. .gdpr-settings-modal .gdpr-settings__reject,\
  537. .gdpr-settings-modal .gdpr-settings__customize,\
  538. .gdpr-options-modal .gdpr-options__reject,\
  539. .gdpr-options-modal .gdpr-options__customize,\
  540. .gdpr-control-modal .gdpr-control__reject,\
  541. .gdpr-control-modal .gdpr-control__customize,\
  542. .gdpr-preferences-modal .gdpr-preferences__reject,\
  543. .gdpr-preferences-modal .gdpr-preferences__customize',
  544. 'div[class*="cookie-banner"] button[class*="reject"],\
  545. div[class*="cookie-banner"] button[class*="decline"],\
  546. div[class*="cookie-banner"] button[class*="settings"],\
  547. div[id*="cookie-banner"] button[class*="reject"],\
  548. div[id*="cookie-banner"] button[class*="decline"],\
  549. div[id*="cookie-banner"] button[class*="settings"]',
  550. 'div[class*="cookie-consent"] button[class*="reject"],\
  551. div[class*="cookie-consent"] button[class*="decline"],\
  552. div[class*="cookie-consent"] button[class*="settings"],\
  553. div[id*="cookie-consent"] button[class*="reject"],\
  554. div[id*="cookie-consent"] button[class*="decline"],\
  555. div[id*="cookie-consent"] button[class*="settings"]',
  556. 'div[class*="cookie-notice"] button[class*="reject"],\
  557. div[class*="cookie-notice"] button[class*="decline"],\
  558. div[class*="cookie-notice"] button[class*="settings"],\
  559. div[id*="cookie-notice"] button[class*="reject"],\
  560. div[id*="cookie-notice"] button[class*="decline"],\
  561. div[id*="cookie-notice"] button[class*="settings"]',
  562. '[data-*="cookie"] button[data-*="reject"],\
  563. [data-*="cookie"] button[data-*="decline"],\
  564. [data-*="cookie"] button[data-*="settings"],\
  565. [data-*="gdpr"] button[data-*="reject"],\
  566. [data-*="gdpr"] button[data-*="decline"],\
  567. [data-*="gdpr"] button[data-*="settings"]',
  568. 'div[class*="cookie-layer"] button[class*="reject"],\
  569. div[class*="cookie-layer"] button[class*="decline"],\
  570. div[class*="cookie-layer"] button[class*="settings"],\
  571. div[id*="cookie-layer"] button[class*="reject"],\
  572. div[id*="cookie-layer"] button[class*="decline"],\
  573. div[id*="cookie-layer"] button[class*="settings"]',
  574. 'div[class*="cookie-section"] button[class*="reject"],\
  575. div[class*="cookie-section"] button[class*="decline"],\
  576. div[class*="cookie-section"] button[class*="settings"],\
  577. div[id*="cookie-section"] button[class*="reject"],\
  578. div[id*="cookie-section"] button[class*="decline"],\
  579. div[id*="cookie-section"] button[class*="settings"]',
  580. 'div[class*="cookie-container"] button[class*="reject"],\
  581. div[class*="cookie-container"] button[class*="decline"],\
  582. div[class*="cookie-container"] button[class*="settings"],\
  583. div[id*="cookie-container"] button[class*="reject"],\
  584. div[id*="cookie-container"] button[class*="decline"],\
  585. div[id*="cookie-container"] button[class*="settings"]',
  586. '[data-purpose*="cookie"] button[data-purpose*="reject"],\
  587. [data-purpose*="cookie"] button[data-purpose*="decline"],\
  588. [data-purpose*="cookie"] button[data-purpose*="settings"],\
  589. [data-ref*="cookie"] button[data-ref*="reject"],\
  590. [data-ref*="cookie"] button[data-ref*="decline"],\
  591. [data-ref*="cookie"] button[data-ref*="settings"]',
  592. '[id*="cookie-manager"] button[id*="reject"],\
  593. [id*="cookie-manager"] button[id*="decline"],\
  594. [id*="cookie-manager"] button[id*="settings"],\
  595. [id*="cookie-control"] button[id*="reject"],\
  596. [id*="cookie-control"] button[id*="decline"],\
  597. [id*="cookie-control"] button[id*="settings"]',
  598. 'div[class*="vn-cookie"] button[class*="reject"],\
  599. div[class*="vn-cookie"] button[class*="decline"],\
  600. div[class*="vn-cookie"] button[class*="settings"],\
  601. div[id*="vn-cookie"] button[class*="reject"],\
  602. div[id*="vn-cookie"] button[class*="decline"],\
  603. div[id*="vn-cookie"] button[class*="settings"]',
  604. 'div[class*="ecommerce"] button[class*="cookie-reject"],\
  605. div[class*="ecommerce"] button[class*="cookie-decline"],\
  606. div[class*="ecommerce"] button[class*="cookie-settings"],\
  607. div[id*="ecommerce"] button[class*="cookie-reject"],\
  608. div[id*="ecommerce"] button[class*="cookie-decline"],\
  609. div[id*="ecommerce"] button[class*="cookie-settings"]',
  610. 'div[class*="news"] button[class*="cookie-reject"],\
  611. div[class*="news"] button[class*="cookie-decline"],\
  612. div[class*="news"] button[class*="cookie-settings"],\
  613. div[id*="news"] button[class*="cookie-reject"],\
  614. div[id*="news"] button[class*="cookie-decline"],\
  615. div[id*="news"] button[class*="cookie-settings"]',
  616. 'div[class*="retail"] button[class*="cookie-reject"],\
  617. div[class*="retail"] button[class*="cookie-decline"],\
  618. div[class*="retail"] button[class*="cookie-settings"],\
  619. div[id*="retail"] button[class*="cookie-reject"],\
  620. div[id*="retail"] button[class*="cookie-decline"],\
  621. div[id*="retail"] button[class*="cookie-settings"]',
  622. 'div[class*="gdpr"] button[class*="reject"],\
  623. div[class*="gdpr"] button[class*="decline"],\
  624. div[class*="gdpr"] button[class*="settings"],\
  625. div[id*="gdpr"] button[class*="reject"],\
  626. div[id*="gdpr"] button[class*="decline"],\
  627. div[id*="gdpr"] button[class*="settings"]',
  628. 'div[class*="privacy"] button[class*="reject"],\
  629. div[class*="privacy"] button[class*="decline"],\
  630. div[class*="privacy"] button[class*="settings"],\
  631. div[id*="privacy"] button[class*="reject"],\
  632. div[id*="privacy"] button[class*="decline"],\
  633. div[id*="privacy"] button[class*="settings"]',
  634. 'div[class*="bank"] button[class*="cookie-reject"],\
  635. div[class*="bank"] button[class*="cookie-decline"],\
  636. div[class*="bank"] button[class*="cookie-settings"],\
  637. div[id*="bank"] button[class*="cookie-reject"],\
  638. div[id*="bank"] button[class*="cookie-decline"],\
  639. div[id*="bank"] button[class*="cookie-settings"]',
  640. 'div[class*="consent"] button[class*="reject"],\
  641. div[class*="consent"] button[class*="decline"],\
  642. div[class*="consent"] button[class*="settings"],\
  643. div[id*="consent"] button[class*="reject"],\
  644. div[id*="consent"] button[class*="decline"],\
  645. div[id*="consent"] button[class*="settings"]',
  646. 'div[class*="notice"] button[class*="reject"],\
  647. div[class*="notice"] button[class*="decline"],\
  648. div[class*="notice"] button[class*="settings"],\
  649. div[id*="notice"] button[class*="reject"],\
  650. div[id*="notice"] button[class*="decline"],\
  651. div[id*="notice"] button[class*="settings"]',
  652. 'div[class*="popup"] button[class*="reject"],\
  653. div[class*="popup"] button[class*="decline"],\
  654. div[class*="popup"] button[class*="settings"],\
  655. div[id*="popup"] button[class*="reject"],\
  656. div[id*="popup"] button[class*="decline"],\
  657. div[id*="popup"] button[class*="settings"]',
  658. 'div[class*="eu-cookie-banner"] button[class*="reject"],\
  659. div[class*="eu-cookie-banner"] button[class*="settings"]',
  660. 'div[class*="gdpr-notice"] button[class*="reject"],\
  661. div[class*="gdpr-notice"] button[class*="settings"]',
  662. 'div[class*="privacy-consent"] button[class*="reject"],\
  663. div[class*="privacy-consent"] button[class*="settings"]',
  664. 'div[class*="asia"] button[class*="cookie-reject"],\
  665. div[class*="asia"] button[class*="cookie-decline"],\
  666. div[class*="asia"] button[class*="cookie-settings"]',
  667. 'div[class*="europe"] button[class*="cookie-reject"],\
  668. div[class*="europe"] button[class*="cookie-decline"],\
  669. div[class*="europe"] button[class*="cookie-settings"]',
  670. 'div[class*="global"] button[class*="cookie-reject"],\
  671. div[class*="global"] button[class*="cookie-decline"],\
  672. div[class*="global"] button[class*="cookie-settings"]',
  673. 'div[class*="america"] button[class*="cookie-reject"],\
  674. div[class*="america"] button[class*="cookie-decline"],\
  675. div[class*="america"] button[class*="cookie-settings"]',
  676. 'div[class*="oceania"] button[class*="cookie-reject"],\
  677. div[class*="oceania"] button[class*="cookie-decline"],\
  678. div[class*="oceania"] button[class*="cookie-settings"]',
  679. ];
  680. let currentChainElement = 0;
  681. const classname = Math.random()
  682. .toString(36)
  683. .replace(/[^a-z]+/g, '');
  684. // Search loop function
  685. let searchGroupsLength = searchGroups.length,
  686. searchPairsKeys = Object.keys(searchPairs),
  687. searchPairsJoinedKeys = searchPairsKeys.join(','),
  688. timeoutDuration = 300;
  689. function querySelectorAllShadowRoot(selector, root = document) {
  690. const elements = [];
  691. const findElements = node => {
  692. if (node.shadowRoot) {
  693. node.shadowRoot.querySelectorAll(selector).forEach(el => elements.push(el));
  694. node.shadowRoot.querySelectorAll('*').forEach(findElements);
  695. }
  696. };
  697. root.querySelectorAll('*').forEach(findElements);
  698. return elements;
  699. }
  700. function searchLoop(counter) {
  701. if (document.cookie.indexOf('cookie_consent') !== -1) {
  702. return;
  703. }
  704. const dynamicTimeout = Math.min(timeoutDuration * (counter + 1), 2000);
  705. setTimeout(function () {
  706. document.querySelectorAll(searchPairsJoinedKeys).forEach(function (box) {
  707. searchPairsKeys.forEach(function (selector) {
  708. if (box.matches(selector)) {
  709. const shadowElements = querySelectorAllShadowRoot(searchPairs[selector].join(','), box);
  710. shadowElements.forEach(button => {
  711. if (button.click && !button.classList.contains(classname)) {
  712. button.classList.add(classname);
  713. if (typeof chrome == 'object' && chrome.runtime) chrome.runtime.sendMessage({ command: 'cookie_warning_dismissed', url: document.location.href });
  714. button.click();
  715. if (selector != '.message-container' && button.getAttribute('href') != '#cookieman-settings')
  716. setTimeout(function () {
  717. if (button) button.click();
  718. }, 500);
  719. timeoutDuration += 500;
  720. }
  721. });
  722. }
  723. });
  724. });
  725. document.querySelectorAll(searchGroups[counter % searchGroupsLength]).forEach(function (element) {
  726. if (element.click && !element.classList.contains(classname)) {
  727. element.classList.add(classname);
  728. if (typeof chrome == 'object' && chrome.runtime) chrome.runtime.sendMessage({ command: 'cookie_warning_dismissed', url: document.location.href });
  729. element.click();
  730. if (element.getAttribute('aria-pressed') != 'true')
  731. setTimeout(function () {
  732. if (element) element.click();
  733. }, 500);
  734. timeoutDuration += 500;
  735. }
  736. });
  737. if (counter < 100 * searchGroupsLength) {
  738. searchLoop(counter + 1);
  739. }
  740. }, dynamicTimeout);
  741. }
  742. // Embeds handling
  743. function handleEmbeds() {
  744. var l = document.location,
  745. is_audioboom = false,
  746. is_dailymotion = false,
  747. is_dailybuzz = false,
  748. is_playerclipslaliga = false;
  749. switch (l.hostname) {
  750. case 'embeds.audioboom.com':
  751. is_audioboom = true;
  752. break;
  753. case 'dailymotion.com':
  754. case 'www.dailymotion.com':
  755. is_dailymotion = l.pathname.indexOf('/embed') === 0;
  756. break;
  757. case 'geo.dailymotion.com':
  758. is_dailymotion = l.pathname.indexOf('/player') === 0;
  759. break;
  760. case 'dailybuzz.nl':
  761. is_dailybuzz = l.pathname.indexOf('/buzz/embed') === 0;
  762. break;
  763. case 'playerclipslaliga.tv':
  764. is_playerclipslaliga = true;
  765. break;
  766. }
  767. function searchEmbeds() {
  768. setTimeout(function () {
  769. if (is_audioboom) {
  770. document.querySelectorAll('div[id^="cookie-modal"] .modal[style*="block"] .btn.mrs:not(.' + classname + ')').forEach(function (button) {
  771. button.className += ' ' + classname;
  772. button.click();
  773. });
  774. } else if (is_dailymotion) {
  775. document.querySelectorAll('.np_DialogConsent-accept:not(.' + classname + '), .consent_screen-accept:not(.' + classname + ')').forEach(function (button) {
  776. button.className += ' ' + classname;
  777. button.click();
  778. });
  779. } else if (is_dailybuzz) {
  780. document.querySelectorAll('#ask-consent #accept:not(.' + classname + ')').forEach(function (button) {
  781. button.className += ' ' + classname;
  782. button.click();
  783. });
  784. } else if (is_playerclipslaliga) {
  785. document.querySelectorAll('#cookies button[onclick*="saveCookiesSelection"]:not(.' + classname + ')').forEach(function (button) {
  786. button.className += ' ' + classname;
  787. button.click();
  788. });
  789. } else {
  790. return;
  791. }
  792. searchEmbeds();
  793. }, 1000);
  794. }
  795. searchEmbeds();
  796. }
  797. // Initialize
  798. var start = setInterval(function () {
  799. var html = document.querySelector('html');
  800. if (!html || /idc0_350/.test(html.className)) return;
  801. clearInterval(start);
  802. html.className += ' idc0_350';
  803. searchLoop(0);
  804. handleEmbeds();
  805. }, 500);
  806. var hostname = document.location.hostname.replace(/^w{2,3}\d*\./i, ''),
  807. items = getItem(hostname);
  808. if (items) {
  809. (items instanceof Array ? items : [items]).forEach(function (item) {
  810. let value = localStorage.getItem(item.key);
  811. if (value == null || (item.strict && value != item.value)) {
  812. localStorage.setItem(item.key, item.value);
  813. counter++;
  814. }
  815. });
  816. if (counter > 0) document.location.reload();
  817. }
  818. })();