Robmoen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132018

Change subject: Only show anonymous editor acquisition once to the user.
......................................................................

Only show anonymous editor acquisition once to the user.

Change-Id: If07df9436e4de1990942223a6d8764f6e16b4f20
---
M GettingStarted.php
M resources/ext.gettingstarted.anonymousEditorAcquisition.js
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/18/132018/1

diff --git a/GettingStarted.php b/GettingStarted.php
index 005de1f..166de2c 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -295,6 +295,7 @@
                'ext.gettingstarted.user',
                'schema.SignupExpPageLinkClick',
                'ext.guidedTour.lib',
+               'jquery.jStorage',
        ),
        'messages' => array(
                'guidedtour-tour-anonymouseditoracquisitionpostedit-title',
diff --git a/resources/ext.gettingstarted.anonymousEditorAcquisition.js 
b/resources/ext.gettingstarted.anonymousEditorAcquisition.js
index 9c070e2..cd149a3 100644
--- a/resources/ext.gettingstarted.anonymousEditorAcquisition.js
+++ b/resources/ext.gettingstarted.anonymousEditorAcquisition.js
@@ -171,6 +171,12 @@
        $( function () {
                var isPreEdit = bucket === 'pre-edit';
 
+               // Only init if user has not seen CTA.
+               if ( $.jStorage.get( 'hasShownAnonymousEditorAcquisitionCTA' ) 
) {
+                       return;
+               }
+               $.jStorage.set( 'hasShownAnonymousEditorAcquisitionCTA', true );
+
                // In the pre-edit variant, clicking "edit" or "edit source"
                // shows a guider so don't follow the link after the
                // SignupExpPageLinkClick event has been logged.

-- 
To view, visit https://gerrit.wikimedia.org/r/132018
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If07df9436e4de1990942223a6d8764f6e16b4f20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to