From bbcb7ba289c4d907bd47a7ba782b0b6e540fdad1 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Mon, 27 Aug 2018 15:34:00 +0200 Subject: Syntax fix --- assets/js/wiki-features.js | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/assets/js/wiki-features.js b/assets/js/wiki-features.js index 12f05b9..41e5216 100644 --- a/assets/js/wiki-features.js +++ b/assets/js/wiki-features.js @@ -107,22 +107,21 @@ // RED LINK FEATURE (Hacky) // TODO: filter external links $.fn.redLinks = function () { - $('a').each(function() { - var that=this; - $.ajax({ - type: 'HEAD', - url: this.href, - success: 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'); - } - } - }); - }; - }); + }, + error: function (xhr, ajaxOptions, thrownError) { + if (xhr.status == 404) { + $(that).css('color', 'red'); + } + } + }); + }); + }; })(jQuery); -- cgit