XOTA PANNEL ✨(AD BLOCKER✅)

AD BLOCKER FOR MULTIPLE WEBSITES: NETFLIX,YOUTUBE,X,TIKTOK,ETC..

  1. // ==UserScript==
  2. // @name XOTA PANNEL ✨(AD BLOCKER✅)
  3. // @namespace http://xota.com/
  4. // @version 1.1
  5. // @description AD BLOCKER FOR MULTIPLE WEBSITES: NETFLIX,YOUTUBE,X,TIKTOK,ETC..
  6. // @author julx
  7. // @license MIT
  8. // @icon https://raw.githubusercontent.com/juliantopyu/XOTAICONS/refs/heads/main/WhatsApp_Image_2025-03-26_at_20.24.13-removebg-preview.png
  9. // @match *://*/*
  10. // @match https://www.youtube.com/
  11. // @match https://www.tiktok.com/
  12. // @grant GM_addStyle
  13. // @grant GM_openInTab
  14. // @grant GM_notification
  15. // @grant GM_setValue
  16. // @grant GM_getValue
  17. // @require https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js
  18. // @resource font1 https://fonts.googleapis.com/css2?family=Bungee+Shade&display=swap
  19. // @resource font2 https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap
  20. // @resource font3 https://fonts.googleapis.com/css2?family=Monoton&display=swap
  21. // @resource discordIcon https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png
  22. // @resource youtubeIcon https://www.google.com/s2/favicons?domain=youtube.com
  23. // @resource twitterIcon https://www.google.com/s2/favicons?domain=twitter.com
  24. // @resource facebookIcon https://www.google.com/s2/favicons?domain=facebook.com
  25. // @resource redditIcon https://www.google.com/s2/favicons?domain=reddit.com
  26. // @resource twitchIcon https://www.google.com/s2/favicons?domain=twitch.tv
  27. // @resource xotaIcon https://raw.githubusercontent.com/juliantopyu/XOTAICONS/refs/heads/main/WhatsApp_Image_2025-03-26_at_20.24.13-removebg-preview.png
  28. // ==/UserScript==
  29.  
  30. GM_addStyle(`
  31. @import url('https://fonts.googleapis.com/css2?family=Bungee+Shade&family=Press+Start+2P&family=Monoton&display=swap');
  32.  
  33. #xota-panel {
  34. position: fixed;
  35. top: 50%;
  36. right: 0;
  37. transform: translateY(-50%);
  38. width: 300px;
  39. background: linear-gradient(135deg, #ff00cc 0%, #3333ff 100%);
  40. border: 3px solid #00ffff;
  41. border-radius: 15px 0 0 15px;
  42. box-shadow: 0 0 25px rgba(255, 0, 204, 0.7),
  43. 0 0 50px rgba(51, 51, 255, 0.5);
  44. padding: 20px;
  45. z-index: 9999;
  46. transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  47. font-family: 'Press Start 2P', cursive;
  48. }
  49.  
  50. #xota-panel:hover {
  51. box-shadow: 0 0 35px rgba(255, 0, 204, 0.9),
  52. 0 0 70px rgba(51, 51, 255, 0.7);
  53. right: 5px;
  54. }
  55.  
  56. #xota-header {
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. gap: 15px;
  61. font-family: 'Monoton', cursive;
  62. font-size: 2.5rem;
  63. margin-bottom: 20px;
  64. color: #fff;
  65. text-shadow: 0 0 10px #00ffff,
  66. 0 0 20px #ff00cc,
  67. 0 0 30px #3333ff;
  68. animation: glow 2s ease-in-out infinite alternate;
  69. }
  70.  
  71. #xota-logo {
  72. width: 50px;
  73. height: 50px;
  74. object-fit: contain;
  75. filter: drop-shadow(0 0 10px #00ffff)
  76. drop-shadow(0 0 20px #ff00cc);
  77. animation: float 3s ease-in-out infinite;
  78. }
  79.  
  80. @keyframes float {
  81. 0%, 100% { transform: translateY(0) rotate(0deg); }
  82. 50% { transform: translateY(-10px) rotate(5deg); }
  83. }
  84.  
  85. @keyframes glow {
  86. from {
  87. text-shadow: 0 0 10px #00ffff,
  88. 0 0 20px #ff00cc,
  89. 0 0 30px #3333ff;
  90. }
  91. to {
  92. text-shadow: 0 0 15px #00ffff,
  93. 0 0 25px #ff00cc,
  94. 0 0 35px #3333ff,
  95. 0 0 45px #ff00cc;
  96. }
  97. }
  98.  
  99. .xota-button {
  100. display: flex;
  101. align-items: center;
  102. width: 100%;
  103. padding: 12px;
  104. margin: 10px 0;
  105. border: none;
  106. border-radius: 8px;
  107. background: linear-gradient(to right, #ff00cc, #3333ff);
  108. color: white;
  109. font-family: 'Press Start 2P', cursive;
  110. font-size: 0.8rem;
  111. cursor: pointer;
  112. transition: all 0.3s ease;
  113. text-align: left;
  114. position: relative;
  115. overflow: hidden;
  116. }
  117.  
  118. .xota-button:hover {
  119. transform: scale(1.05);
  120. box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
  121. }
  122.  
  123. .xota-button:active {
  124. transform: scale(0.98);
  125. }
  126.  
  127. .xota-button:before {
  128. content: "";
  129. position: absolute;
  130. top: -50%;
  131. left: -50%;
  132. width: 200%;
  133. height: 200%;
  134. background: linear-gradient(
  135. to bottom right,
  136. rgba(255, 255, 255, 0) 0%,
  137. rgba(255, 255, 255, 0) 45%,
  138. rgba(255, 255, 255, 0.5) 48%,
  139. rgba(255, 255, 255, 0) 52%,
  140. rgba(255, 255, 255, 0) 100%
  141. );
  142. transform: rotate(30deg);
  143. animation: shine 3s infinite;
  144. }
  145.  
  146. @keyframes shine {
  147. 0% {
  148. left: -50%;
  149. top: -50%;
  150. }
  151. 100% {
  152. left: 150%;
  153. top: 150%;
  154. }
  155. }
  156.  
  157. .xota-button i {
  158. margin-right: 10px;
  159. font-size: 1.2rem;
  160. width: 20px;
  161. text-align: center;
  162. }
  163.  
  164. .site-icon {
  165. width: 20px;
  166. height: 20px;
  167. margin-right: 10px;
  168. }
  169.  
  170. .modal {
  171. display: none;
  172. position: fixed;
  173. top: 0;
  174. left: 0;
  175. width: 100%;
  176. height: 100%;
  177. background: rgba(0, 0, 0, 0.8);
  178. z-index: 10000;
  179. justify-content: center;
  180. align-items: center;
  181. }
  182.  
  183. .modal-content {
  184. background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
  185. padding: 30px;
  186. border-radius: 15px;
  187. text-align: center;
  188. max-width: 500px;
  189. width: 90%;
  190. border: 3px solid #00ffff;
  191. box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
  192. animation: pulse 2s infinite;
  193. max-height: 80vh;
  194. overflow-y: auto;
  195. }
  196.  
  197. @keyframes pulse {
  198. 0% {
  199. box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
  200. }
  201. 50% {
  202. box-shadow: 0 0 50px rgba(0, 255, 255, 1);
  203. }
  204. 100% {
  205. box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
  206. }
  207. }
  208.  
  209. .modal h2 {
  210. color: white;
  211. font-family: 'Bungee Shade', cursive;
  212. margin-bottom: 20px;
  213. }
  214.  
  215. .modal p {
  216. color: white;
  217. font-family: 'Press Start 2P', cursive;
  218. font-size: 0.8rem;
  219. margin-bottom: 20px;
  220. }
  221.  
  222. .modal-close {
  223. background: #ff3366;
  224. color: white;
  225. border: none;
  226. padding: 10px 20px;
  227. border-radius: 5px;
  228. font-family: 'Press Start 2P', cursive;
  229. cursor: pointer;
  230. transition: all 0.3s ease;
  231. margin-top: 20px;
  232. }
  233.  
  234. .modal-close:hover {
  235. background: #ff0044;
  236. transform: scale(1.1);
  237. }
  238.  
  239. .button-active {
  240. animation: buttonClick 0.5s ease;
  241. }
  242.  
  243. @keyframes buttonClick {
  244. 0% { transform: scale(1); }
  245. 50% { transform: scale(0.95); background: #00ffff; }
  246. 100% { transform: scale(1); }
  247. }
  248.  
  249. #save-settings {
  250. background: #00cc66;
  251. margin-top: 10px;
  252. }
  253.  
  254. #save-settings:hover {
  255. background: #00aa55;
  256. }
  257.  
  258. .setting-item {
  259. margin-bottom: 15px;
  260. text-align: left;
  261. }
  262.  
  263. .setting-item label {
  264. display: block;
  265. color: white;
  266. font-family: 'Press Start 2P', cursive;
  267. font-size: 0.7rem;
  268. margin-bottom: 5px;
  269. }
  270.  
  271. .setting-item input[type="checkbox"] {
  272. margin-right: 10px;
  273. transform: scale(1.3);
  274. }
  275.  
  276. .setting-item input[type="text"] {
  277. width: 100%;
  278. padding: 8px;
  279. border-radius: 5px;
  280. border: none;
  281. font-family: 'Press Start 2P', cursive;
  282. font-size: 0.7rem;
  283. }
  284.  
  285. .popular-sites {
  286. display: grid;
  287. grid-template-columns: repeat(2, 1fr);
  288. gap: 10px;
  289. margin: 20px 0;
  290. }
  291.  
  292. .site-toggle {
  293. display: flex;
  294. align-items: center;
  295. background: rgba(255, 255, 255, 0.1);
  296. padding: 8px;
  297. border-radius: 5px;
  298. cursor: pointer;
  299. transition: all 0.2s;
  300. }
  301.  
  302. .site-toggle:hover {
  303. background: rgba(255, 255, 255, 0.2);
  304. }
  305.  
  306. .site-toggle input {
  307. margin-right: 8px;
  308. }
  309.  
  310. /* INSANE EYE TOGGLE BUTTON - POSITIONED ON TOP */
  311. #xota-eye-toggle {
  312. position: absolute;
  313. right: calc(100% + 15px);
  314. top: 20px;
  315. width: 50px;
  316. height: 50px;
  317. background: linear-gradient(45deg, #ff00cc, #3333ff);
  318. border: 3px solid #00ffff;
  319. border-radius: 50%;
  320. display: flex;
  321. justify-content: center;
  322. align-items: center;
  323. cursor: pointer;
  324. z-index: 10000;
  325. box-shadow: 0 0 20px rgba(255, 0, 204, 0.7),
  326. 0 0 40px rgba(51, 51, 255, 0.5);
  327. transition: all 0.3s ease;
  328. animation: eyeFloat 3s infinite ease-in-out;
  329. }
  330.  
  331. @keyframes eyeFloat {
  332. 0%, 100% { transform: translateY(0) rotate(0deg); }
  333. 50% { transform: translateY(-10px) rotate(5deg); }
  334. }
  335.  
  336. #xota-eye-toggle:hover {
  337. transform: scale(1.2) rotate(10deg);
  338. box-shadow: 0 0 30px rgba(255, 0, 204, 0.9),
  339. 0 0 60px rgba(51, 51, 255, 0.7),
  340. 0 0 90px rgba(0, 255, 255, 0.5);
  341. animation: none;
  342. }
  343.  
  344. #xota-eye-toggle i {
  345. font-size: 24px;
  346. color: white;
  347. text-shadow: 0 0 10px #00ffff;
  348. transition: all 0.3s ease;
  349. }
  350.  
  351. #xota-eye-toggle:hover i {
  352. transform: scale(1.3);
  353. text-shadow: 0 0 15px #00ffff,
  354. 0 0 30px #ff00cc;
  355. }
  356.  
  357. /* EYE SPARKLE EFFECTS */
  358. .eye-sparkle {
  359. position: absolute;
  360. width: 8px;
  361. height: 8px;
  362. background: white;
  363. border-radius: 50%;
  364. pointer-events: none;
  365. opacity: 0;
  366. filter: drop-shadow(0 0 5px cyan);
  367. }
  368.  
  369. /* PANEL STATES */
  370. .panel-hidden {
  371. transform: translateY(-50%) translateX(calc(100% + 20px)) !important;
  372. }
  373.  
  374. .panel-hidden #xota-eye-toggle {
  375. right: calc(100% + 35px);
  376. }
  377. `);
  378.  
  379. (function() {
  380. 'use strict';
  381.  
  382. // Initialize settings
  383. const defaultSettings = {
  384. adBlockEnabled: true,
  385. blockedSites: ['youtube.com', 'twitter.com', 'facebook.com', 'reddit.com', 'twitch.tv'],
  386. panelVisible: true
  387. };
  388.  
  389. let settings = GM_getValue('xotaSettings', defaultSettings);
  390.  
  391. // Popular sites with icons
  392. const popularSites = [
  393. { domain: 'youtube.com', name: 'YouTube', icon: 'https://www.google.com/s2/favicons?domain=youtube.com' },
  394. { domain: 'twitter.com', name: 'Twitter', icon: 'https://www.google.com/s2/favicons?domain=twitter.com' },
  395. { domain: 'facebook.com', name: 'Facebook', icon: 'https://www.google.com/s2/favicons?domain=facebook.com' },
  396. { domain: 'reddit.com', name: 'Reddit', icon: 'https://www.google.com/s2/favicons?domain=reddit.com' },
  397. { domain: 'twitch.tv', name: 'Twitch', icon: 'https://www.google.com/s2/favicons?domain=twitch.tv' },
  398. { domain: 'instagram.com', name: 'Instagram', icon: 'https://www.google.com/s2/favicons?domain=instagram.com' },
  399. { domain: 'tiktok.com', name: 'TikTok', icon: 'https://www.google.com/s2/favicons?domain=tiktok.com' },
  400. { domain: 'netflix.com', name: 'Netflix', icon: 'https://www.google.com/s2/favicons?domain=netflix.com' }
  401. ];
  402.  
  403. // Create panel container
  404. const panel = document.createElement('div');
  405. panel.id = 'xota-panel';
  406. if (!settings.panelVisible) panel.classList.add('panel-hidden');
  407.  
  408. // Add header with logo
  409. const header = document.createElement('div');
  410. header.id = 'xota-header';
  411.  
  412. // Create XOTA logo image
  413. const logoImg = document.createElement('img');
  414. logoImg.id = 'xota-logo';
  415. logoImg.src = 'https://raw.githubusercontent.com/juliantopyu/XOTAICONS/refs/heads/main/WhatsApp_Image_2025-03-26_at_20.24.13-removebg-preview.png';
  416. logoImg.alt = 'XOTA Logo';
  417.  
  418. // Create header text
  419. const headerText = document.createElement('span');
  420. headerText.textContent = 'XOTA';
  421.  
  422. // Add both to header
  423. header.appendChild(logoImg);
  424. header.appendChild(headerText);
  425. panel.appendChild(header);
  426.  
  427. // Create Discord icon element
  428. const discordIcon = document.createElement('img');
  429. discordIcon.className = 'site-icon';
  430. discordIcon.src = 'https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png';
  431. discordIcon.alt = 'Discord';
  432.  
  433. // Create settings modal
  434. const settingsModal = document.createElement('div');
  435. settingsModal.className = 'modal';
  436. settingsModal.id = 'settings-modal';
  437.  
  438. // Create Discord modal
  439. const discordModal = document.createElement('div');
  440. discordModal.className = 'modal';
  441. discordModal.id = 'discord-modal';
  442.  
  443. // Add buttons
  444. const buttons = [
  445. {
  446. icon: '<i class="fa fa-cog"></i>',
  447. text: 'AD-BLOCK SETTINGS',
  448. action: () => showModal('settings-modal')
  449. },
  450. {
  451. icon: discordIcon.outerHTML,
  452. text: 'JOIN DISCORD',
  453. action: () => showModal('discord-modal')
  454. }
  455. ];
  456.  
  457. buttons.forEach(btn => {
  458. const button = document.createElement('button');
  459. button.className = 'xota-button';
  460. button.innerHTML = `${btn.icon} ${btn.text}`;
  461.  
  462. button.addEventListener('click', function() {
  463. this.classList.add('button-active');
  464. setTimeout(() => {
  465. this.classList.remove('button-active');
  466. }, 500);
  467. btn.action();
  468. });
  469.  
  470. panel.appendChild(button);
  471. });
  472.  
  473. // Build settings modal content
  474. const settingsContent = document.createElement('div');
  475. settingsContent.className = 'modal-content';
  476. settingsContent.innerHTML = `
  477. <h2>XOTA AD-BLOCK SETTINGS</h2>
  478.  
  479. <div class="setting-item">
  480. <label>
  481. <input type="checkbox" id="ad-block-toggle" ${settings.adBlockEnabled ? 'checked' : ''}>
  482. ENABLE AD-BLOCK
  483. </label>
  484. </div>
  485.  
  486. <h3>POPULAR SITES</h3>
  487. <div class="popular-sites" id="popular-sites-container">
  488. <!-- Popular sites will be added here -->
  489. </div>
  490.  
  491. <div class="setting-item">
  492. <label for="blocked-sites">CUSTOM SITES (comma separated):</label>
  493. <input type="text" id="blocked-sites" value="${settings.blockedSites.filter(site =>
  494. !popularSites.map(p => p.domain).includes(site)).join(', ')}">
  495. </div>
  496.  
  497. <button id="save-settings" class="xota-button">
  498. <i class="fa fa-save"></i> SAVE SETTINGS
  499. </button>
  500. <button class="modal-close">CLOSE</button>
  501. `;
  502.  
  503. settingsModal.appendChild(settingsContent);
  504.  
  505. // Build Discord modal content
  506. const discordContent = document.createElement('div');
  507. discordContent.className = 'modal-content';
  508. discordContent.innerHTML = `
  509. <h2>JOIN XOTA DISCORD!</h2>
  510. <p>CLICK BELOW TO JOIN OUR AWESOME COMMUNITY</p>
  511. <button id="discord-join" class="xota-button" style="margin: 0 auto;">
  512. <img src="https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png" class="site-icon" alt="Discord">
  513. JOIN NOW
  514. </button>
  515. <button class="modal-close">CLOSE</button>
  516. `;
  517.  
  518. discordModal.appendChild(discordContent);
  519.  
  520. // Create INSANE EYE TOGGLE BUTTON (ON TOP OF PANEL)
  521. const eyeToggle = document.createElement('div');
  522. eyeToggle.id = 'xota-eye-toggle';
  523. eyeToggle.innerHTML = `<i class="fa ${settings.panelVisible ? 'fa-eye' : 'fa-eye-slash'}"></i>`;
  524.  
  525. eyeToggle.addEventListener('click', function() {
  526. // Toggle panel visibility
  527. settings.panelVisible = !settings.panelVisible;
  528. GM_setValue('xotaSettings', settings);
  529.  
  530. // Update icon
  531. this.innerHTML = `<i class="fa ${settings.panelVisible ? 'fa-eye' : 'fa-eye-slash'}"></i>`;
  532.  
  533. // Toggle panel class
  534. panel.classList.toggle('panel-hidden');
  535.  
  536. // Create insane sparkle effect
  537. createSparkles(this);
  538.  
  539. // Crazy bounce animation
  540. this.style.transform = 'scale(1.5) rotate(20deg)';
  541. setTimeout(() => {
  542. this.style.transform = 'scale(1) rotate(0deg)';
  543. }, 300);
  544. });
  545.  
  546. function createSparkles(element) {
  547. for (let i = 0; i < 15; i++) {
  548. const sparkle = document.createElement('div');
  549. sparkle.className = 'eye-sparkle';
  550.  
  551. // Random position around the eye
  552. const angle = Math.random() * Math.PI * 2;
  553. const distance = 30 + Math.random() * 20;
  554. sparkle.style.left = '50%';
  555. sparkle.style.top = '50%';
  556.  
  557. // Random animation
  558. const animName = `sparkleAnim${Date.now()}${i}`;
  559. const duration = 0.5 + Math.random() * 0.5;
  560.  
  561. GM_addStyle(`
  562. @keyframes ${animName} {
  563. 0% {
  564. transform: translate(-50%, -50%) scale(0);
  565. opacity: 1;
  566. }
  567. 100% {
  568. transform: translate(
  569. ${Math.cos(angle) * distance}px,
  570. ${Math.sin(angle) * distance}px
  571. ) scale(${Math.random() * 0.5 + 0.5});
  572. opacity: 0;
  573. }
  574. }
  575. `);
  576.  
  577. sparkle.style.animation = `${animName} ${duration}s forwards`;
  578. element.appendChild(sparkle);
  579.  
  580. // Remove after animation
  581. setTimeout(() => sparkle.remove(), duration * 1000);
  582. }
  583. }
  584.  
  585. // Add eye toggle to panel (POSITIONED ON TOP)
  586. panel.appendChild(eyeToggle);
  587.  
  588. // Add modals to body
  589. document.body.appendChild(settingsModal);
  590. document.body.appendChild(discordModal);
  591. document.body.appendChild(panel);
  592.  
  593. // Populate popular sites
  594. const popularSitesContainer = document.getElementById('popular-sites-container');
  595. popularSites.forEach(site => {
  596. const siteToggle = document.createElement('div');
  597. siteToggle.className = 'site-toggle';
  598. siteToggle.innerHTML = `
  599. <input type="checkbox" id="site-${site.domain}" ${settings.blockedSites.includes(site.domain) ? 'checked' : ''}>
  600. <img src="${site.icon}" class="site-icon" alt="${site.name}">
  601. <label for="site-${site.domain}">${site.name}</label>
  602. `;
  603. popularSitesContainer.appendChild(siteToggle);
  604. });
  605.  
  606. // Modal control functions
  607. function showModal(modalId) {
  608. document.getElementById(modalId).style.display = 'flex';
  609. }
  610.  
  611. function hideModal(modalId) {
  612. document.getElementById(modalId).style.display = 'none';
  613. }
  614.  
  615. // Close buttons
  616. document.querySelectorAll('.modal-close').forEach(btn => {
  617. btn.addEventListener('click', function() {
  618. hideModal(this.closest('.modal').id);
  619. });
  620. });
  621.  
  622. // Save settings handler
  623. document.getElementById('save-settings').addEventListener('click', function() {
  624. const adBlockEnabled = document.getElementById('ad-block-toggle').checked;
  625. const blockedSites = [...settings.blockedSites];
  626.  
  627. // Get popular sites selections
  628. popularSites.forEach(site => {
  629. const checkbox = document.getElementById(`site-${site.domain}`);
  630. if (checkbox.checked && !blockedSites.includes(site.domain)) {
  631. blockedSites.push(site.domain);
  632. } else if (!checkbox.checked && blockedSites.includes(site.domain)) {
  633. const index = blockedSites.indexOf(site.domain);
  634. blockedSites.splice(index, 1);
  635. }
  636. });
  637.  
  638. // Add custom sites
  639. const customSites = document.getElementById('blocked-sites').value
  640. .split(',')
  641. .map(site => site.trim().toLowerCase())
  642. .filter(site => site.length > 0 && !popularSites.map(p => p.domain).includes(site));
  643.  
  644. settings = {
  645. ...settings,
  646. adBlockEnabled,
  647. blockedSites: [...new Set([...blockedSites, ...customSites])]
  648. };
  649.  
  650. GM_setValue('xotaSettings', settings);
  651. GM_notification({
  652. text: 'Settings saved successfully!',
  653. title: 'XOTA SETTINGS',
  654. timeout: 2000
  655. });
  656.  
  657. // Reload to apply changes
  658. setTimeout(() => location.reload(), 1000);
  659. });
  660.  
  661. // Discord join button
  662. document.getElementById('discord-join').addEventListener('click', () => {
  663. GM_openInTab('https://discord.gg/NCsAVKkq', { active: true });
  664. hideModal('discord-modal');
  665. });
  666.  
  667. // Apply ad-blocking if enabled for current site
  668. const currentHost = window.location.hostname.replace('www.', '');
  669. if (settings.adBlockEnabled && settings.blockedSites.some(site => currentHost.includes(site))) {
  670. applyAdBlocking();
  671. }
  672.  
  673. function applyAdBlocking() {
  674. console.log('XOTA Ad-blocker active on this site');
  675.  
  676. // Advanced ad-blocking selectors
  677. const adSelectors = [
  678. // Universal ad selectors
  679. 'div[class*="ad"]',
  680. 'div[class*="Ad"]',
  681. 'div[id*="ad"]',
  682. 'div[id*="Ad"]',
  683. 'iframe[src*="ads"]',
  684. 'iframe[src*="ad."]',
  685. 'img[src*="ad"]',
  686. 'ins.adsbygoogle',
  687. 'div.ad-container',
  688. 'div.ad-wrapper',
  689.  
  690. // Platform-specific selectors
  691. '#player-ads', // YouTube
  692. '.ytp-ad-module', // YouTube
  693. '.video-ads', // YouTube
  694. '[data-testid="placementTracking"]', // Twitter
  695. '[data-testid="ad"]', // Twitter
  696. '[aria-label="Ad"]', // Twitter
  697. '.ad-banner', // Common
  698. '.ad-sidebar', // Common
  699. '.ad-popup', // Common
  700. '.ad-overlay', // Common
  701. '.ad-notice', // Common
  702. '.advert', // Common
  703. '.sponsored-content', // Common
  704. '.promoted-content', // Common
  705. '.paid-content' // Common
  706. ];
  707.  
  708. // Remove ad elements
  709. adSelectors.forEach(selector => {
  710. document.querySelectorAll(selector).forEach(el => {
  711. el.remove();
  712. console.log('Blocked ad element:', el);
  713. });
  714. });
  715.  
  716. // Block ad scripts
  717. const adScripts = Array.from(document.scripts).filter(script =>
  718. script.src && (script.src.includes('adservice') ||
  719. script.src.includes('adsbygoogle') ||
  720. script.src.includes('doubleclick') ||
  721. script.src.includes('advertising'))
  722. );
  723.  
  724. adScripts.forEach(script => {
  725. script.remove();
  726. console.log('Blocked ad script:', script.src);
  727. });
  728. }
  729. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址