-
-
Save 01-Scripts/3010527 to your computer and use it in GitHub Desktop.
Show icon after external link using Font Awesome
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
a[href^="http://"]:after { | |
content: "\f08e"; | |
font-family: FontAwesome; | |
font-weight: normal; | |
font-style: normal; | |
display: inline-block; | |
text-decoration: none; | |
padding-left: 3px; | |
} | |
/* Strip from links to own domain or with class no_icon */ | |
a[href^="http://own-domain.com"]:after, | |
a.no_icon:after { | |
content:"" !important; | |
padding-left: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@laymonk,
I tryed your script and it works fine!
Could you please give me an example how to exclide the own domain?
Thank you!