summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-08-27 15:34:00 +0200
committerGitHub <noreply@github.com>2018-08-27 15:34:00 +0200
commitbbcb7ba289c4d907bd47a7ba782b0b6e540fdad1 (patch)
treeaa1ce06bde33913597b9d6cabaf63d03ececbc55 /assets
parenta21c4706013e4e06dd16702b069d0cbdf1807076 (diff)
downloadwiki-bbcb7ba289c4d907bd47a7ba782b0b6e540fdad1.tar.gz
wiki-bbcb7ba289c4d907bd47a7ba782b0b6e540fdad1.tar.bz2
wiki-bbcb7ba289c4d907bd47a7ba782b0b6e540fdad1.zip
Syntax fix
Diffstat (limited to 'assets')
-rw-r--r--assets/js/wiki-features.js31
1 files 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);