diff --git a/client.js b/client.js index 8f627dc..9403c6a 100644 --- a/client.js +++ b/client.js @@ -1,4 +1,30 @@ + // 100% Incompatible Browser Suppression & Error Guardian + if (typeof window !== 'undefined') { + try { + window.displayIncompatibleBrowser = function () {}; + var neuterIncompatible = function () { + var el = document.getElementById('incompatible-browser'); + if (el) { + el.classList.add('browser-ok'); + el.style.setProperty('display', 'none', 'important'); + if (el.parentNode) el.parentNode.removeChild(el); + } + }; + neuterIncompatible(); + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', neuterIncompatible); + } + try { + var incompObserver = new MutationObserver(function () { + neuterIncompatible(); + }); + incompObserver.observe(document.documentElement || document.body, { childList: true, subtree: true }); + } catch (e) {} + setInterval(neuterIncompatible, 1000); + } catch (e) {} + } + // Immediate URL rewrite: redirect legacy /search/videos to /search if (typeof window !== 'undefined' && window.location) { if (window.location.pathname === '/search/videos' || window.location.pathname.startsWith('/search/videos/')) { diff --git a/package.json b/package.json index dfd4d5b..4dce07f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "peertube-plugin-yaktube-ondemand", - "version": "1.4.22", + "version": "1.4.23", "description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube", "main": "main.js", "library": "./main.js", diff --git a/style.css b/style.css index fd3a3f9..2230afc 100644 --- a/style.css +++ b/style.css @@ -1,4 +1,8 @@ -/* 100% Elimination of PeerTube Mobile Open-in-App Banner & Close Button */ +/* 100% Elimination of PeerTube Mobile Open-in-App & Incompatible Browser Banners */ +#incompatible-browser, +.alert-light#incompatible-browser, +div[id="incompatible-browser"], +.incompatible-browser, .mobile-msg, my-header .mobile-msg, [class*='mobile-msg'], @@ -16,7 +20,7 @@ button[title*='Dismiss'], pointer-events: none !important; opacity: 0 !important; position: absolute !important; - z-index: -99999 !important; + z-index: -999999 !important; clip: rect(0, 0, 0, 0) !important; }