Skip to content

Instantly share code, notes, and snippets.

@joseeight
Created March 23, 2016 05:16
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 joseeight/043d06f0c7d117031765 to your computer and use it in GitHub Desktop.
Save joseeight/043d06f0c7d117031765 to your computer and use it in GitHub Desktop.
removeFacebookContent();
window.addEventListener('scroll', removeFacebookContent);
function removeFacebookContent() {
var els = document.querySelectorAll('.shared-image, .video-embedded');
for (var i = 0, currEl;
(currEl = els[i]); i++) {
currEl.innerHTML = "!!! Content was removed because this isn't Facebook !!!";
}
}
@joseeight
Copy link
Author

To avoid the error, you could just display = "none" or get fancy by adding a click to view link. I'll do that later with the Chrome extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment