aaaaaaa
بۇ قوليازمىنى بىۋاسىتە قاچىلاشقا بولمايدۇ. بۇ باشقا قوليازمىلارنىڭ ئىشلىتىشى ئۈچۈن تەمىنلەنگەن ئامبار بولۇپ، ئىشلىتىش ئۈچۈن مېتا كۆرسەتمىسىگە قىستۇرىدىغان كود: // @require https://update.sleazyfork.org/scripts/606603/2005932/Hide%20Reddit%20app%20banner.js
// ==UserScript==
// @name Hide Reddit app banner
// @match https://*.reddit.com/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function () {
const TEXT = 'Get the Reddit app';
function fixedAncestor(el) {
let n = el, found = null;
while (n && n !== document.documentElement) {
const p = getComputedStyle(n).position;
if (p === 'fixed' || p === 'sticky') found = n;
const root = n.getRootNode();
n = n.parentElement || (root instanceof ShadowRoot ? root.host : null);
}
return found;
}
function sweep(root) {
root.querySelectorAll('*').forEach(el => {
if (el.shadowRoot) sweep(el.shadowRoot);
const t = el.textContent || '';
if (t.includes(TEXT) && t.length < 200) {
const a = fixedAncestor(el);
if (a && a.getBoundingClientRect().height < 200)
a.style.setProperty('display', 'none', 'important');
}
});
}
let timer;
const run = () => { clearTimeout(timer); timer = setTimeout(() => sweep(document), 300); };
new MutationObserver(run).observe(document.documentElement, { childList: true, subtree: true });
sweep(document);
})();