MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 73: Line 73:
                     }
                     }
                 }
                 }
                // Add a style to the user links to indicate donator status
                userelements.forEach(function (el) {
                    var match = el.href.match(/(?<=\/wiki\/User:).*/gi);
                    if (match) {
                        var user = match[0];
                        var userindex = users.indexOf(user);
                        if (userindex != -1) {
                            if (userdata[userindex].groups.includes("donator")) {
                                el.style.color = "purple";
                            }
                        }
                    }
                });


             } );
             } );