Skip to content

Instantly share code, notes, and snippets.

@lucahammer
Created September 23, 2023 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucahammer/19ee2154f2c53a568915ba5bd0d4ed4a to your computer and use it in GitHub Desktop.
Save lucahammer/19ee2154f2c53a568915ba5bd0d4ed4a to your computer and use it in GitHub Desktop.
(function (obj, method) {
obj[method] = (function (obj_method) {
return function (child) {
if (child.getAttribute("data-testid") == "tweet") return child;
return obj_method.apply(this, arguments);
};
})(obj[method]);
})(Element.prototype, "removeChild");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment