Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/163100
Change subject: While clicking on redlinks in source article, make the link red
......................................................................
While clicking on redlinks in source article, make the link red
The source article shows blue links for all kind of links. But it is when
user click on a source link, we get to know whether it is a redlink.
Mark it as redlink by adding a class redlink.
Ideally, we need to identify red links when page is loaded, but that is
bit complicated and involves and api hit.
This solution seems to be 'better than nothing' approach.
Source link card does not appear when clicking on such links.
Change-Id: I7aa777e2bbabad76e068d0991bb185d5615786e2
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 3 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/00/163100/1
diff --git a/modules/tools/ext.cx.tools.link.js
b/modules/tools/ext.cx.tools.link.js
index f481b10..6f151a1 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -353,9 +353,10 @@
pageId = Object.keys( response.query.pages )[ 0 ];
if ( pageId === '-1' ) {
- if ( !linkCard.$link ) {
- linkCard.$sourceLinkCard.hide();
+ if ( linkCard.$link ) {
+ linkCard.$link.addClass( 'new' );
}
+
return;
}
page = response.query.pages[ pageId ];
--
To view, visit https://gerrit.wikimedia.org/r/163100
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7aa777e2bbabad76e068d0991bb185d5615786e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits