African Hope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380420 )
Change subject: CheckUser "contributions" link should be a red link for non-existent accounts ...................................................................... CheckUser "contributions" link should be a red link for non-existent accounts In Special:CheckUser, when a user had tried create and account while this was prevented by abusefilter, his or her "contributions" link was still blue instead of a red link (as if that user actually exists). The patch add takes advantage of the existing yet unsued css class .mw-anonuserlink, and turn the link to red. Bug: T170507 Change-Id: I669affa176f6c5b0dbf61ac3ca4e77a4fb6eb3e5 --- M extension.json A modules/ext.checkuser.links.js 2 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CheckUser refs/changes/20/380420/1 diff --git a/extension.json b/extension.json index 0803a14..a22c7e6 100644 --- a/extension.json +++ b/extension.json @@ -78,6 +78,12 @@ "mediawiki.util" ] }, + "ext.checkUser": { + "scripts": "modules/ext.checkuser.links.js", + "dependencies": [ + "mediawiki.Title" + ] + }, "ext.checkUser.caMultiLock": { "scripts": "modules/ext.checkuser.caMultiLock.js", "dependencies": [ diff --git a/modules/ext.checkuser.links.js b/modules/ext.checkuser.links.js new file mode 100644 index 0000000..96b0718 --- /dev/null +++ b/modules/ext.checkuser.links.js @@ -0,0 +1,20 @@ +/** + * Check existence of links and mark the missing ones red + */ +( function ( mw, $ ) { + + // Find all links with the .new.mw-userlink class, referring to unexisting users + $("form#checkuserblock #checkuserresults a.new.mw-userlink").each(function( i, urlObj ) { + + // Search for the sibling Contributions link + if($(urlObj).siblings().has("a[href*='Special:Contributions']")) { + + var contributionsLink = $(urlObj).siblings("a[href*='Special:Contributions']:first"); + + // Add class .new + $(contributionsLink).addClass("new"); + + }; + + }); +}( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/380420 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I669affa176f6c5b0dbf61ac3ca4e77a4fb6eb3e5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CheckUser Gerrit-Branch: master Gerrit-Owner: African Hope <samuelgu...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits