Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/55775
Change subject: Alpha: Create CTA for watchlist only once
......................................................................
Alpha: Create CTA for watchlist only once
It seems in alpha due to the page-loaded event currently firing (see 45299)
this gets created twice resulting in two DOM elements
Should probably be done globally to avoid this in the meantime
Change-Id: I64a2ebff747af7c1ff0d63e9d4b584dabb06a19f
---
M javascripts/modules/mf-watchstar.js
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/75/55775/1
diff --git a/javascripts/modules/mf-watchstar.js
b/javascripts/modules/mf-watchstar.js
index b1c162b..8c97cf5 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -1,7 +1,8 @@
(function( M, $ ) {
var api = M.require( 'api' ), w = ( function() {
- var lastToken, nav = M.require( 'navigation' ), popup = M.require(
'notifications' );
+ var lastToken, nav = M.require( 'navigation' ), popup = M.require(
'notifications' ),
+ drawer = new nav.CtaDrawer( { content: mw.msg(
'mobile-frontend-watchlist-cta' ) } );
// FIXME: this should live in a separate module and make use of
MobileFrontend events
function logWatchEvent( eventType ) {
@@ -140,7 +141,6 @@
}
function initWatchListIcon( container, title ) {
- var drawer = new nav.CtaDrawer( { content: mw.msg(
'mobile-frontend-watchlist-cta' ) } );
api.getToken( 'watch' ).done( function( token ) {
lastToken = token;
--
To view, visit https://gerrit.wikimedia.org/r/55775
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I64a2ebff747af7c1ff0d63e9d4b584dabb06a19f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits