diff options
| author | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-31 12:44:35 +0100 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-31 12:44:35 +0100 |
| commit | a9575d934d387e93cb5ff3ca1f5c51c4422f8875 (patch) | |
| tree | 15b70c1ff21d4f82d7c7f55d3607d0d5d9b49e06 /assets/js | |
| parent | 88800a6427a418b32923df4eeb4200b5e1daba99 (diff) | |
| download | wiki-a9575d934d387e93cb5ff3ca1f5c51c4422f8875.tar.gz wiki-a9575d934d387e93cb5ff3ca1f5c51c4422f8875.tar.bz2 wiki-a9575d934d387e93cb5ff3ca1f5c51c4422f8875.zip | |
Implemented external links icon (wikipedia style)
Diffstat (limited to 'assets/js')
| -rw-r--r-- | assets/js/red-links.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/js/red-links.js b/assets/js/red-links.js index 065d3a9..8c1d719 100644 --- a/assets/js/red-links.js +++ b/assets/js/red-links.js @@ -7,8 +7,11 @@ function () { $('a').each(function () { // avoid red link for external urls - if (this.hostname != window.location.hostname) + if (this.hostname != window.location.hostname) { + if ($(this).parents('#git-wiki-content').length > 0) + $(this).addClass("external-link"); return; + } var ext = this.href.split('.').pop().split(/\#|\?/)[0]; |
