Skip to content

Instantly share code, notes, and snippets.

@jarv
Created January 16, 2015 18:42
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarv/ec34057d8e8138c8b921 to your computer and use it in GitHub Desktop.
Save jarv/ec34057d8e8138c8b921 to your computer and use it in GitHub Desktop.
fontawesome ublock adblock workaround
.my-fa-facebook:before {
content: "\f09a";
}
.my-fa-facebook-square:before {
content: "\f082";
}
.my-fa-flickr:before {
content: "\f16e";
}
.my-fa-google-plus-square:before {
content: "\f0d4";
}
.my-fa-google-plus:before {
content: "\f0d5";
}
.my-fa-google:before {
content: "\f1a0";
}
.my-fa-instagram:before {
content: "\f16d";
}
.my-fa-linkedin:before {
content: "\f0e1";
}
.my-fa-linkedin-square:before {
content: "\f08c";
}
.my-fa-pinterest:before {
content: "\f0d2";
}
.my-fa-pinterest-square:before {
content: "\f0d3";
}
.my-fa-reddit:before {
content: "\f1a1";
}
.my-fa-reddit-square:before {
content: "\f1a2";
}
.my-fa-share-square-o:before {
content: "\f045";
}
.my-fa-share-alt:before {
content: "\f1e0";
}
.my-fa-soundcloud:before {
content: "\f1be";
}
.my-fa-tumblr:before {
content: "\f173";
}
.my-fa-tumblr-square:before {
content: "\f174";
}
.my-fa-twitter-square:before {
content: "\f081";
}
.my-fa-twitter:before {
content: "\f099";
}
.my-fa-youtube-square:before {
content: "\f166";
}
.my-fa-youtube:before {
content: "\f167";
}
.my-fa-youtube-play:before {
content: "\f16a";
}
@soumyaray
Copy link

@pranshu1992: Simply put this CSS file in your site, and to it in your layout file. Then, wherever you would use (for example) <i class="fa fa-twitter" ...>, just use <i class="fa my-fa-twitter" ...>. Having said that, I found that Ad Block on Safari would still block google icons, so I had to rename them from .my-fa-google-* to my-fa-ggl-* (or whatever renaming you want) in both the new CSS and my HTML code calling the icon.

@antgustech
Copy link

Is this broken? I have tried this solution but not managed to get it working.

@danielvallecl
Copy link

Yeah, this doesn't work for me either

@ptisinge
Copy link

Same here. Not working either. Very annoyingly...

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