Created
July 21, 2015 13:57
-
-
Save laxapple/91475374016b6dd2c901 to your computer and use it in GitHub Desktop.
Add little arrows to the external links
This file contains 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
// ==UserScript== | |
// @name Link_Blank | |
// @namespace http://www.linyoo.com/ | |
// @version 0.1 | |
// @description Add little arrows to the external links | |
// @author You | |
// @require http://cdn.staticfile.org/jquery/1.8.3/jquery.min.js | |
// @include http* | |
// @grant none | |
// ==/UserScript== | |
$(document).ready(function() { | |
$('head').append('<link href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">'); | |
$('a[href*="/"]').each(function() { | |
if( typeof($(this).attr('target')) !== 'undefined' ) { | |
$(this).append('<i class="fa fa-level-up"></i>'); | |
$(this).children('.fa').css({ | |
color: 'Grey', | |
opacity: 0.6 | |
}); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment