mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-30 11:06:55 +00:00
Make category links arrow link to actual categories
I believe having arrows linked to the actual pages can be much more useful than linking to '#' of the same page. Linking to the correct page makes user to notice if the page is already visited also using color of the arrow. If we didn't like link visited logic to be not used we could've used a different link rather than color of links and going makes us able to :visited logic of If8b2b45b24351ee5c8fc9ee1380563f5d5b88678 also. Personally however I'm in believe that having a useful link that can be opened on a different tab using Ctrl (or long click on phones) is always more useful. Change-Id: Ib56fad0b711853d67b2d55617b36deff56141c74
This commit is contained in:
parent
b1e3b5f06d
commit
fcc3334125
|
@ -372,6 +372,7 @@ class CategoryTree {
|
|||
// href and role will be added client-side
|
||||
'class' => 'CategoryTreeToggle',
|
||||
'data-ct-title' => $key,
|
||||
'href' => $title->getLocalURL(),
|
||||
];
|
||||
|
||||
if ( $children === 0 ) {
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
$content.find( '.CategoryTreeToggle' )
|
||||
.on( 'click', handleNode )
|
||||
.attr( {
|
||||
href: '#',
|
||||
role: 'button',
|
||||
title: function () {
|
||||
return mw.msg(
|
||||
|
|
Loading…
Reference in a new issue