MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / hideReposts

Function hideReposts

twitter-hide-reposts/twitter-hide-reposts.user.js:129–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127const alreadyHiddenCSS = '[style*="display: none;"]'
128
129function hideReposts() {
130 var n = document.querySelectorAll(tweetCSS + ':has(' + repostCSS + '):not(' + alreadyHiddenCSS + ')')
131 for (let i = 0; i < n.length; i++) {
132 n[i].style.display = 'none'
133 console.debug('hid a repost')
134 }
135 setTimeout(hideReposts, 500)
136}
137hideReposts()
138window.addEventListener('scroll', hideReposts)
139

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected