Greasy Fork is available in English.

§
पोस्ट केले: 2021-12-19

用每100ms检查标题去掉的办法,会不停的闪,不能完全去除

Use:

.class-of-this-element{display: none}; // elem.style.display = 'none'

or

let observer = new MutationObserver(mutationRecords => {
mutationRecords.forEach( (record)=>{
record.addedNodes( (node)=> {
if (node.classList.includes('your-element-class')) node.parentNode.removeChild(node);
} )
} )
});

observer.observe(document, {
childList: true,
subtree: true
});

NEVER use setInterval like this
§
पोस्ट केले: 2021-12-21

Use:

Thank you for your replay.

What I mean is that to forbid auto-add '(2 new messages)' in the title from some site, instead of delete some element of a website.

If you want to forbid the auto adding, I think you need to redefine appendChild method of the parent node (it will work only if this element adding to parent by this method).

element.parentNode.appendChild = function(){}

उत्तर पोस्ट करा

उत्तर पोस्ट करण्यासाठी साइन इन करा.