From: Timo Tijhof Date: Wed, 16 Dec 2015 00:31:18 +0000 (-0800) Subject: mediawiki.page.watch: Remove obsolete CSS selectors X-Git-Tag: 1.31.0-rc.0~8648^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=db00c53b43b18d34946bbfca49962d8b939cb95d;p=lhc%2Fweb%2Fwiklou.git mediawiki.page.watch: Remove obsolete CSS selectors Change-Id: I4f80f1e6df5d77d9ad0ab2cc661c9bb5989c9aef --- diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 163f3d57ca..c0e5556937 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -1027,7 +1027,9 @@ class SkinTemplate extends Skin { */ $mode = $user->isWatched( $title ) ? 'unwatch' : 'watch'; $content_navigation['actions'][$mode] = array( - 'class' => $onPage && ( $action == 'watch' || $action == 'unwatch' ) ? 'selected' : false, + 'class' => 'mw-watchlink ' . ( + $onPage && ( $action == 'watch' || $action == 'unwatch' ) ? 'selected' : '' + ), // uses 'watch' or 'unwatch' message 'text' => $this->msg( $mode )->text(), 'href' => $title->getLocalURL( array( 'action' => $mode ) ) diff --git a/resources/src/mediawiki/page/watch.js b/resources/src/mediawiki/page/watch.js index a3197da367..578c846cc5 100644 --- a/resources/src/mediawiki/page/watch.js +++ b/resources/src/mediawiki/page/watch.js @@ -105,11 +105,8 @@ }; $( function () { - var $links = $( '.mw-watchlink a, a.mw-watchlink, ' + - '#ca-watch a, #ca-unwatch a, #mw-unwatch-link1, ' + - '#mw-unwatch-link2, #mw-watch-link2, #mw-watch-link1' ); - - // Allowing people to add inline animated links is a little scary + var $links = $( '.mw-watchlink a, a.mw-watchlink' ); + // Restrict to core interfaces, ignore user-generated content $links = $links.filter( ':not( #bodyContent *, #content * )' ); $links.click( function ( e ) {