Skip to content

Instantly share code, notes, and snippets.

@LinzardMac
Created March 6, 2019 02:08
Show Gist options
  • Save LinzardMac/b1377eb4ee5a4cd5ecda69bfef5fb751 to your computer and use it in GitHub Desktop.
Save LinzardMac/b1377eb4ee5a4cd5ecda69bfef5fb751 to your computer and use it in GitHub Desktop.
Anonymize facebook post w/ comments to protect identity when screensharing

Paste this in to your web inspector's CSS editor when viewing a post on facebook and it will block out the names and hide the avatars to hide the identity of individuals when taking a screenshot to share.


For Chrome

  • Press Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, Chrome OS) to open Chrome Developer Tools and jump straight into the Console panel.
  • Paste the contents of chrome-console-inspector.css file into the console and hit enter

For Safari

  • Press Command+Option+i (Mac) to open the Safari Web Inspector
  • Click the "console" tab across the top
  • Paste the contents of safari-console-inspector.js file into the console and hit enter

*** To clear the anonymization simple reload the page ***

(function(){
let style = `<style>
/* post author card anonymization */
.userContentWrapper .fwb >a {
background: #365899;
color: #365899!important;
}
.userContentWrapper div div div a ::after {
background: #000;
}
/* comment anonymization */
a.profileLink {
background: #365899;
color: #365899!important;
}
a.UFICommentActorName {
background: #365899!important;
color: #365899!important;
}
/* hide names in minimized comment list link */
.UFIReplyActorPhotoWrapper ::after {
content: ' ';
bottom: -4px;
position: absolute;
right: -24px;
top: -7px;
left: 23px;
border: 1px solid rgba(0, 0, 0, .1);
z-index: 99999;
border-radius: 51%;
background: #000;
}
span.UFIReplySocialSentenceLinkText {
background: #365899;
}
</style>`;
document.head.insertAdjacentHTML("beforeend", style);
})();
/* post author card anonymization */
.userContentWrapper .fwb >a {
background: #365899;
color: #365899!important;
}
.userContentWrapper div div div a ::after {
background: #000;
}
/* comment anonymization */
a.profileLink {
background: #365899;
color: #365899!important;
}
a.UFICommentActorName {
background: #365899!important;
color: #365899!important;
}
/* hide names in minimized comment list link */
.UFIReplyActorPhotoWrapper ::after {
content: ' ';
bottom: -4px;
position: absolute;
right: -24px;
top: -7px;
left: 23px;
border: 1px solid rgba(0, 0, 0, .1);
z-index: 99999;
border-radius: 51%;
background: #000;
}
span.UFIReplySocialSentenceLinkText {
background: #365899;
}
(function(){
var style = `<style>
/* post author card anonymization */
.userContentWrapper .fwb >a {
background: #365899;
color: #365899!important;
}
.userContentWrapper div div div a ::after {
background: #000;
}
/* comment anonymization */
a.profileLink {
background: #365899;
color: #365899!important;
}
a.UFICommentActorName {
background: #365899!important;
color: #365899!important;
}
/* hide names in minimized comment list link */
.UFIReplyActorPhotoWrapper ::after {
content: ' ';
bottom: -4px;
position: absolute;
right: -24px;
top: -7px;
left: 23px;
border: 1px solid rgba(0, 0, 0, .1);
z-index: 99999;
border-radius: 51%;
background: #000;
}
span.UFIReplySocialSentenceLinkText {
background: #365899;
}
</style>`;
document.head.insertAdjacentHTML("beforeend", style);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment