Last active
June 20, 2023 06:18
-
-
Save masnormen/72c65fd93008d720f7a2b928b8172934 to your computer and use it in GitHub Desktop.
Block Shopee Affiliate in Twitter (Arc Boost)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* For Arc users: In the Boost editor, add this script into content.js | |
*/ | |
let timeoutId; | |
function hideShopeeAffiliates() { | |
clearTimeout(timeoutId); | |
timeoutId = setTimeout(function() { | |
document.querySelectorAll("[data-testid='cellInnerDiv']").forEach(div => { | |
if (div.innerHTML.includes("shope.ee")) { | |
div.style.display = "none"; | |
} | |
}); | |
}, 100); | |
} | |
window.addEventListener("scroll", function() { | |
hideShopeeAffiliates(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment