fix(mobile): eradicate incompatible browser false positive banner across mobile and desktop (v1.4.23)

This commit is contained in:
Enes Yakıştır
2026-09-04 06:42:38 +03:00
parent c0af4e86b2
commit 64afa7c5e9
3 changed files with 33 additions and 3 deletions
+26
View File
@@ -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/')) {
+1 -1
View File
@@ -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",
+6 -2
View File
@@ -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;
}