summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-12-31 12:44:35 +0100
committerYehonal <yehonal.azeroth@gmail.com>2018-12-31 12:44:35 +0100
commita9575d934d387e93cb5ff3ca1f5c51c4422f8875 (patch)
tree15b70c1ff21d4f82d7c7f55d3607d0d5d9b49e06 /assets/js
parent88800a6427a418b32923df4eeb4200b5e1daba99 (diff)
downloadwiki-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.js5
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];