summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/js/wiki-features.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/assets/js/wiki-features.js b/assets/js/wiki-features.js
index 237bf05..4fb58a1 100644
--- a/assets/js/wiki-features.js
+++ b/assets/js/wiki-features.js
@@ -102,4 +102,27 @@
render[settings.showEffect]();
};
+
+ //
+ // RED LINK FEATURE (Hacky)
+ // TODO: filter external links
+ $(window).load(function () {
+ $('a').each(function() {
+ var that=this;
+ $.ajax({
+ type: 'HEAD',
+ url: this.href,
+ success: function() {
+
+ },
+ error: function (xhr, ajaxOptions, thrownError){
+ if(xhr.status==404) {
+ console.log("err");
+ $(that).css('color', 'red');
+ }
+ }
+ });
+ });
+ });
+
})(jQuery);