Bug 1164208 - Update Pocket code to latest version (May 11th code drop) r=jaws a=dolske
authorJustin Dolske <dolske@mozilla.com>
Wed, 13 May 2015 20:44:52 -0700
changeset 260489 55c04a549775
parent 260488 89ef57a1733a
child 260490 9a7a198e1b06
push id799
push userjdolske@mozilla.com
push date2015-05-14 03:46 +0000
treeherdermozilla-release@11c4678a21bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, dolske
bugs1164208
milestone38.0.1
Bug 1164208 - Update Pocket code to latest version (May 11th code drop) r=jaws a=dolske
browser/components/pocket/main.js
browser/components/pocket/panels/css/signup.css
browser/components/pocket/panels/js/saved.js
browser/components/pocket/panels/js/signup.js
browser/components/pocket/panels/js/tmpl.js
browser/components/pocket/panels/tmpl/signup_shell.handlebars
browser/components/pocket/panels/tmpl/signupstoryboard_shell.handlebars
browser/components/pocket/pktApi.js
--- a/browser/components/pocket/main.js
+++ b/browser/components/pocket/main.js
@@ -289,17 +289,17 @@ var pktUI = (function() {
             var fxasignedin = (typeof userdata == 'object' && userdata !== null) ? '1' : '0';
             var startheight = 490;
             var inOverflowMenu = isInOverflowMenu();
             
             if (inOverflowMenu) 
             {
             	startheight = overflowMenuHeight;
             }
-            else if (pktApi.getSignupAB() == 'storyboard')
+            else if (pktApi.getSignupAB().indexOf('storyboard') > -1)
             {
                 startheight = 460;
                 if (fxasignedin == '1')
                 {
                     startheight = 406;
                 }
             }
             else
--- a/browser/components/pocket/panels/css/signup.css
+++ b/browser/components/pocket/panels/css/signup.css
@@ -103,16 +103,19 @@
     }
 }
 .pkt_ext_containersignup .pkt_ext_tagline {
     margin-bottom: 0.5em;
 }
 .pkt_ext_containersignup .pkt_ext_learnmore {
     font-size: 12px;
 }
+.pkt_ext_containersignup .pkt_ext_learnmoreinactive {
+    visibility: hidden;
+}
 .pkt_ext_signupdetail h4 {
     font-size: 12px;
     font-weight: normal;
 }
 .pkt_ext_signupdetail .btn-container {
     position: relative;
     margin-bottom: 0.8em;
 }
@@ -351,16 +354,30 @@
 .pkt_ext_signup_ru .signup-btn-firefox .text,
 .pkt_ext_signup_ru .signup-btn-email {
     font-size: 15px;
 }
 .pkt_ext_signup_ja .signup-btn-firefox .text,
 .pkt_ext_signup_ru .signup-btn-firefox .text {
     left: 15px;
 }
+.pkt_ext_signup_de .signup-btn-firefox .logo,
+.pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-firefox .logo,
+.pkt_ext_signup_ja .signup-btn-firefox .logo,
+.pkt_ext_signup_ru .signup-btn-firefox .logo {
+    height: 2.4em;
+}
+@media (min-resolution: 1.1dppx) {
+    .pkt_ext_signup_de .signup-btn-firefox .logo,
+    .pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-firefox .logo,
+    .pkt_ext_signup_ja .signup-btn-firefox .logo,
+    .pkt_ext_signup_ru .signup-btn-firefox .logo {
+        height: 2.5em;
+    }
+}
 .pkt_ext_signup_de .signup-btn-email,
 .pkt_ext_signup_es .pkt_ext_signupdetail_hero .signup-btn-email,
 .pkt_ext_signup_ja .signup-btn-email,
 .pkt_ext_signup_ru .signup-btn-email {
     min-width: 13em;
     padding: 0.8533em 1.2667em;
 }
 .pkt_ext_signup_de .pkt_ext_logo,
--- a/browser/components/pocket/panels/js/saved.js
+++ b/browser/components/pocket/panels/js/saved.js
@@ -73,17 +73,17 @@ var PKT_SAVED_OVERLAY = function (option
                 myself.suggestedTagsLoaded = true;
                 if (!myself.mouseInside) {
                     myself.startCloseTimer();
                 }
                 myself.fillTagContainer(newtags,$('.pkt_ext_suggestedtag_detail ul'),'token_suggestedtag');
             }
             else if (resp.status == 'error') {
                 var msg = $('<p class="suggestedtag_msg">');
-                msg.text(resp.error);
+                msg.text(resp.error.message);
                 $('.pkt_ext_suggestedtag_detail').append(msg);
                 this.suggestedTagsLoaded = true;
                 if (!myself.mouseInside) {
                     myself.startCloseTimer();
                 }
             }
         });
     }
@@ -310,26 +310,26 @@ var PKT_SAVED_OVERLAY = function (option
                 {
                     originaltags.push(text);
                 }
             });
 
             thePKT_SAVED.sendMessage("addTags",
             {
                 url: myself.savedUrl,
-                tags: originaltags   
+                tags: originaltags
             }, function(resp)
             {
                 if (resp.status == 'success') 
                 {
                     myself.showStateFinalMsg(myself.dictJSON.tagssaved);
                 }
                 else if (resp.status == 'error') 
                 {
-                    $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error);
+                    $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error.message);
                 }
             });
         });
     };
     this.initRemovePageInput = function() {
         $('.pkt_ext_removeitem').click(function(e) {
             if ($(this).parents('.pkt_ext_item_actions_disabled').length) {
                 e.preventDefault();
@@ -343,17 +343,17 @@ var PKT_SAVED_OVERLAY = function (option
                 thePKT_SAVED.sendMessage("deleteItem",
                 {
                     itemId: myself.savedItemId
                 },function(resp) {
                     if (resp.status == 'success') {
                         myself.showStateFinalMsg(myself.dictJSON.pageremoved);
                     }
                     else if (resp.status == 'error') {
-                        $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error);
+                        $('.pkt_ext_edit_msg').addClass('pkt_ext_edit_msg_error pkt_ext_edit_msg_active').text(resp.error.message);
                     }
                 });
             }
         });
     };
     this.initOpenListInput = function() {
         $('.pkt_ext_openpocket').click(function(e)
         {
--- a/browser/components/pocket/panels/js/signup.js
+++ b/browser/components/pocket/panels/js/signup.js
@@ -183,31 +183,32 @@ PKT_SIGNUP_OVERLAY.prototype = {
         }
         this.active = true;
 
         // set translations
         this.getTranslations();
         this.dictJSON.fxasignedin = this.fxasignedin ? 1 : 0;
         this.dictJSON.variant = (this.variant ? this.variant : 'undefined');
         this.dictJSON.pockethost = this.pockethost;
+        this.dictJSON.showlearnmore = (this.variant.indexOf('_lm') > -1 || this.variant == 'storyboard' || this.variant == 'hero') ? 1 : 0;
 
         // extra modifier class for collapsed state
         if (this.inoverflowmenu)
         {
             $('body').addClass('pkt_ext_signup_overflow');
         }
 
         // extra modifier class for language
         if (this.locale)
         {
             $('body').addClass('pkt_ext_signup_' + this.locale);
         }
 
         // Create actual content
-        if (this.variant == 'storyboard')
+        if (this.variant == 'storyboard' || this.variant == 'storyboard_lm' || this.variant == 'storyboard_nlm')
         {
             $('body').append(Handlebars.templates.signupstoryboard_shell(this.dictJSON));
         }
         else
         {
             $('body').append(Handlebars.templates.signup_shell(this.dictJSON));
         }
 
--- a/browser/components/pocket/panels/js/tmpl.js
+++ b/browser/components/pocket/panels/js/tmpl.js
@@ -24,105 +24,127 @@ templates['saved_shell'] = template({"co
     + "</a></li>\n            </ul>\n        </nav>                        \n    </div>\n    <div class=\"pkt_ext_tag_detail pkt_ext_cf\">\n        <div class=\"pkt_ext_tag_input_wrapper\">\n            <div class=\"pkt_ext_tag_input_blocker\"></div>\n            <input class=\"pkt_ext_tag_input\" type=\"text\" placeholder=\""
     + escapeExpression(((helper = (helper = helpers.addtags || (depth0 != null ? depth0.addtags : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"addtags","hash":{},"data":data}) : helper)))
     + "\">\n        </div>\n        <a href=\"#\" class=\"pkt_ext_btn pkt_ext_btn_disabled\">"
     + escapeExpression(((helper = (helper = helpers.save || (depth0 != null ? depth0.save : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"save","hash":{},"data":data}) : helper)))
     + "</a>\n    </div>\n    <p class=\"pkt_ext_edit_msg\"></p>                        \n</div>";
 },"useData":true});
 templates['signup_shell'] = template({"1":function(depth0,helpers,partials,data) {
   var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
-  return "	<p class=\"btn-container\"><a href=\"https://"
+  return "	<p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore\" href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/ff_signup?s="
+    + "?s=ffi&t=learnmore&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
-    + escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
-    + "</span></a></p>\n";
+    + "\" target=\"_blank\">"
+    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+    + "</a></p>\n";
 },"3":function(depth0,helpers,partials,data) {
   var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "	<p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">"
+    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+    + "</a></p>\n";
+},"5":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
   return "	<p class=\"btn-container\"><a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/ff_signup?s="
+    + "/ff_signup?s=ffi&t=signupff&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+    + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+    + escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
+    + "</span></a></p>\n";
+},"7":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "	<p class=\"btn-container\"><a href=\"https://"
+    + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+    + "/ff_signup?s=ffi&t=signupff&v="
+    + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+    + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
     + escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox","hash":{},"data":data}) : helper)))
-    + "</span></a></p>\n	<p class=\"btn-container\"><a href=\"http://"
+    + "</span></a></p>\n	<p class=\"btn-container\"><a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/signup?force=email&src=extension&s="
+    + "/signup?force=email&src=extension&s=ffi&t=signupemail&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
+    + "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
     + escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupemail","hash":{},"data":data}) : helper)))
     + "</a></p>\n";
 },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
   var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"pkt_ext_introdetail pkt_ext_introdetailhero\">\n	<h2 class=\"pkt_ext_logo\">Pocket</h2>\n	<p class=\"pkt_ext_tagline\">"
     + escapeExpression(((helper = (helper = helpers.tagline || (depth0 != null ? depth0.tagline : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"tagline","hash":{},"data":data}) : helper)))
-    + "</p>\n	<p class=\"pkt_ext_learnmorecontainer\"><a class=\"pkt_ext_learnmore\" href=\"http://"
-    + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "?s="
-    + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm&src=ff_learn_more\" target=\"_blank\">"
-    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
-    + "</a></p>\n	<div class=\"pkt_ext_introimg\"></div>\n</div>\n<div class=\"pkt_ext_signupdetail pkt_ext_signupdetail_hero\">\n	<h4>"
+    + "</p>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "	<div class=\"pkt_ext_introimg\"></div>\n</div>\n<div class=\"pkt_ext_signupdetail pkt_ext_signupdetail_hero\">\n	<h4>"
     + escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave","hash":{},"data":data}) : helper)))
     + "</h4>\n";
-  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
   if (stack1 != null) { buffer += stack1; }
   return buffer + "	<p class=\"alreadyhave\">"
     + escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct","hash":{},"data":data}) : helper)))
-    + " <a href=\"http://"
+    + " <a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/login?ep=3&src=extension&s="
+    + "/login?ep=3&src=extension&s=ffi&t=login&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=\"_blank\">"
+    + "\" target=\"_blank\">"
     + escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"loginnow","hash":{},"data":data}) : helper)))
     + "</a>.</p>\n</div>";
 },"useData":true});
 templates['signupstoryboard_shell'] = template({"1":function(depth0,helpers,partials,data) {
   var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
-  return "	<p class=\"btn-container\"><a href=\"https://"
+  return "			<p><a class=\"pkt_ext_learnmore\" href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/ff_signup?s="
+    + "?s=ffi&t=learnmore&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
-    + escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
-    + "</span></a></p>\n";
+    + "\" target=\"_blank\">"
+    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+    + "</a></p>\n";
 },"3":function(depth0,helpers,partials,data) {
   var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "			<p><a class=\"pkt_ext_learnmore pkt_ext_learnmoreinactive\" href=\"#\">"
+    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
+    + "</a></p>\n";
+},"5":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
   return "	<p class=\"btn-container\"><a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/ff_signup?s="
+    + "/ff_signup?s=ffi&t=signupff&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+    + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
+    + escapeExpression(((helper = (helper = helpers.signinfirefox || (depth0 != null ? depth0.signinfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signinfirefox","hash":{},"data":data}) : helper)))
+    + "</span></a></p>\n";
+},"7":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "	<p class=\"btn-container\"><a href=\"https://"
+    + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
+    + "/ff_signup?s=ffi&t=signupff&v="
+    + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
+    + "\" target=\"_blank\" class=\"btn signup-btn-firefox\"><span class=\"logo\"></span><span class=\"text\">"
     + escapeExpression(((helper = (helper = helpers.signupfirefox || (depth0 != null ? depth0.signupfirefox : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupfirefox","hash":{},"data":data}) : helper)))
-    + "</span></a></p>\n	<p class=\"btn-container\"><a href=\"http://"
+    + "</span></a></p>\n	<p class=\"btn-container\"><a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/signup?force=email&src=extension&s="
+    + "/signup?force=email&src=extension&s=ffi&t=signupemail&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
+    + "\" target=\"_blank\" class=\"btn btn-secondary signup-btn-email signup-btn-initstate\">"
     + escapeExpression(((helper = (helper = helpers.signupemail || (depth0 != null ? depth0.signupemail : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signupemail","hash":{},"data":data}) : helper)))
     + "</a></p>\n";
 },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
   var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"pkt_ext_introdetail pkt_ext_introdetailstoryboard\">\n	<div class=\"pkt_ext_introstory pkt_ext_introstoryone\">\n		<div class=\"pkt_ext_introstory_text\">\n			<p class=\"pkt_ext_tagline\">"
     + escapeExpression(((helper = (helper = helpers.taglinestory_one || (depth0 != null ? depth0.taglinestory_one : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_one","hash":{},"data":data}) : helper)))
     + "</p>\n		</div>\n		<div class=\"pkt_ext_introstoryone_img\"></div>\n	</div>\n	<div class=\"pkt_ext_introstorydivider\"></div>\n	<div class=\"pkt_ext_introstory pkt_ext_introstorytwo\">\n		<div class=\"pkt_ext_introstory_text\">\n			<p class=\"pkt_ext_tagline\">"
     + escapeExpression(((helper = (helper = helpers.taglinestory_two || (depth0 != null ? depth0.taglinestory_two : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"taglinestory_two","hash":{},"data":data}) : helper)))
-    + "</p>\n			<p><a class=\"pkt_ext_learnmore\" href=\"http://"
-    + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "?s="
-    + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm&src=ff_learn_more\" target=\"_blank\">"
-    + escapeExpression(((helper = (helper = helpers.learnmore || (depth0 != null ? depth0.learnmore : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"learnmore","hash":{},"data":data}) : helper)))
-    + "</a></p>\n		</div>\n		<div class=\"pkt_ext_introstorytwo_img\"></div>\n	</div>\n</div>\n<div class=\"pkt_ext_signupdetail\">\n	<h4>"
+    + "</p>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showlearnmore : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "		</div>\n		<div class=\"pkt_ext_introstorytwo_img\"></div>\n	</div>\n</div>\n<div class=\"pkt_ext_signupdetail\">\n	<h4>"
     + escapeExpression(((helper = (helper = helpers.signuptosave || (depth0 != null ? depth0.signuptosave : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signuptosave","hash":{},"data":data}) : helper)))
     + "</h4>\n";
-  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.fxasignedin : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
   if (stack1 != null) { buffer += stack1; }
   return buffer + "	<p class=\"alreadyhave\">"
     + escapeExpression(((helper = (helper = helpers.alreadyhaveacct || (depth0 != null ? depth0.alreadyhaveacct : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"alreadyhaveacct","hash":{},"data":data}) : helper)))
-    + " <a href=\"http://"
+    + " <a href=\"https://"
     + escapeExpression(((helper = (helper = helpers.pockethost || (depth0 != null ? depth0.pockethost : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"pockethost","hash":{},"data":data}) : helper)))
-    + "/login?ep=3&src=extension&s="
+    + "/login?ep=3&src=extension&s=ffi&t=login&v="
     + escapeExpression(((helper = (helper = helpers.variant || (depth0 != null ? depth0.variant : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"variant","hash":{},"data":data}) : helper)))
-    + "&t=wlm\" target=\"_blank\">"
+    + "\" target=\"_blank\">"
     + escapeExpression(((helper = (helper = helpers.loginnow || (depth0 != null ? depth0.loginnow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"loginnow","hash":{},"data":data}) : helper)))
     + "</a>.</p>\n</div>";
 },"useData":true});
 })();
\ No newline at end of file
--- a/browser/components/pocket/panels/tmpl/signup_shell.handlebars
+++ b/browser/components/pocket/panels/tmpl/signup_shell.handlebars
@@ -1,16 +1,20 @@
 <div class="pkt_ext_introdetail pkt_ext_introdetailhero">
 	<h2 class="pkt_ext_logo">Pocket</h2>
 	<p class="pkt_ext_tagline">{{tagline}}</p>
-	<p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore" href="http://{{pockethost}}?s={{variant}}&t=wlm&src=ff_learn_more" target="_blank">{{learnmore}}</a></p>
+	{{#if showlearnmore}}
+	<p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore" href="https://{{pockethost}}?s=ffi&t=learnmore&v={{variant}}" target="_blank">{{learnmore}}</a></p>
+	{{else}}
+	<p class="pkt_ext_learnmorecontainer"><a class="pkt_ext_learnmore pkt_ext_learnmoreinactive" href="#">{{learnmore}}</a></p>
+	{{/if}}
 	<div class="pkt_ext_introimg"></div>
 </div>
 <div class="pkt_ext_signupdetail pkt_ext_signupdetail_hero">
 	<h4>{{signuptosave}}</h4>
 	{{#if fxasignedin}}
-	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s={{variant}}&t=wlm" target=_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signinfirefox}}</span></a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s=ffi&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signinfirefox}}</span></a></p>
 	{{else}}
-	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s={{variant}}&t=wlm" target=_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p>
-	<p class="btn-container"><a href="http://{{pockethost}}/signup?force=email&src=extension&s={{variant}}&t=wlm" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s=ffi&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/signup?force=email&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p>
 	{{/if}}
-	<p class="alreadyhave">{{alreadyhaveacct}} <a href="http://{{pockethost}}/login?ep=3&src=extension&s={{variant}}&t=wlm" target="_blank">{{loginnow}}</a>.</p>
+	<p class="alreadyhave">{{alreadyhaveacct}} <a href="https://{{pockethost}}/login?ep=3&src=extension&s=ffi&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p>
 </div>
\ No newline at end of file
--- a/browser/components/pocket/panels/tmpl/signupstoryboard_shell.handlebars
+++ b/browser/components/pocket/panels/tmpl/signupstoryboard_shell.handlebars
@@ -4,23 +4,27 @@
 			<p class="pkt_ext_tagline">{{taglinestory_one}}</p>
 		</div>
 		<div class="pkt_ext_introstoryone_img"></div>
 	</div>
 	<div class="pkt_ext_introstorydivider"></div>
 	<div class="pkt_ext_introstory pkt_ext_introstorytwo">
 		<div class="pkt_ext_introstory_text">
 			<p class="pkt_ext_tagline">{{taglinestory_two}}</p>
-			<p><a class="pkt_ext_learnmore" href="http://{{pockethost}}?s={{variant}}&t=wlm&src=ff_learn_more" target="_blank">{{learnmore}}</a></p>
+			{{#if showlearnmore}}
+			<p><a class="pkt_ext_learnmore" href="https://{{pockethost}}?s=ffi&t=learnmore&v={{variant}}" target="_blank">{{learnmore}}</a></p>
+			{{else}}
+			<p><a class="pkt_ext_learnmore pkt_ext_learnmoreinactive" href="#">{{learnmore}}</a></p>
+			{{/if}}
 		</div>
 		<div class="pkt_ext_introstorytwo_img"></div>
 	</div>
 </div>
 <div class="pkt_ext_signupdetail">
 	<h4>{{signuptosave}}</h4>
 	{{#if fxasignedin}}
-	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s={{variant}}&t=wlm" target=_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signinfirefox}}</span></a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s=ffi&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signinfirefox}}</span></a></p>
 	{{else}}
-	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s={{variant}}&t=wlm" target=_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p>
-	<p class="btn-container"><a href="http://{{pockethost}}/signup?force=email&src=extension&s={{variant}}&t=wlm" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/ff_signup?s=ffi&t=signupff&v={{variant}}" target="_blank" class="btn signup-btn-firefox"><span class="logo"></span><span class="text">{{signupfirefox}}</span></a></p>
+	<p class="btn-container"><a href="https://{{pockethost}}/signup?force=email&src=extension&s=ffi&t=signupemail&v={{variant}}" target="_blank" class="btn btn-secondary signup-btn-email signup-btn-initstate">{{signupemail}}</a></p>
 	{{/if}}
-	<p class="alreadyhave">{{alreadyhaveacct}} <a href="http://{{pockethost}}/login?ep=3&src=extension&s={{variant}}&t=wlm" target="_blank">{{loginnow}}</a>.</p>
+	<p class="alreadyhave">{{alreadyhaveacct}} <a href="https://{{pockethost}}/login?ep=3&src=extension&s=ffi&t=login&v={{variant}}" target="_blank">{{loginnow}}</a>.</p>
 </div>
\ No newline at end of file
--- a/browser/components/pocket/pktApi.js
+++ b/browser/components/pocket/pktApi.js
@@ -44,21 +44,18 @@
 
 var pktApi = (function() {
 
     /**
      * Configuration
      */
 
     // Base url for all api calls
-    // TODO: This is a dev server and will be changed before launch
-    var pocketAPIhost = Services.prefs.getCharPref("browser.pocket.api");
-    var pocketSiteHost = Services.prefs.getCharPref("browser.pocket.site");
-
-    // Base url for all api calls
+    var pocketAPIhost = Services.prefs.getCharPref("browser.pocket.api"); 	// api.getpocket.com
+    var pocketSiteHost = Services.prefs.getCharPref("browser.pocket.site"); // getpocket.com
     var baseAPIUrl = "https://" + pocketAPIhost + "/v3";
 
 
     /**
      * Auth keys for the API requests
      */
     var oAuthConsumerKey = Services.prefs.getCharPref("browser.pocket.oAuthConsumerKey");
 
@@ -81,16 +78,33 @@ var pktApi = (function() {
             for (var key in arguments[i]) {
                 if (arguments[i].hasOwnProperty(key))
                     out[key] = arguments[i][key];
                 }
             }
         return out;
     }
 
+    var parseJSON = function(jsonString){
+        try {
+            var o = JSON.parse(jsonString);
+
+            // Handle non-exception-throwing cases:
+            // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,
+            // but... JSON.parse(null) returns 'null', and typeof null === "object", 
+            // so we must check for that, too.
+            if (o && typeof o === "object" && o !== null) {
+                return o;
+            }
+        }
+        catch (e) { }
+
+        return undefined;
+    };
+
     /**
      * Settings
      */
 
     /**
      * Wrapper for different plattforms to get settings for a given key
      * @param  {string} key A string containing the name of the key you want to
      *                  retrieve the value of
@@ -169,16 +183,39 @@ var pktApi = (function() {
             setSetting("fsv1", sessionId);
         }
 
         // Return access token
         return pocketCookies['ftv1'];
     }
 
     /**
+     * Get the current premium status of the user
+     * @return {number | undefined} Premium status of user
+     */
+    function getPremiumStatus() {
+        var premiumStatus = getSetting("premium_status");
+        if (typeof premiumStatus === "undefined") {
+            // Premium status is not in settings try get it from cookie
+            var pocketCookies = getCookiesFromPocket();
+            premiumStatus = pocketCookies['ps'];
+        }
+        return premiumStatus;
+    }
+
+    /**
+     * Helper method to check if a user is premium or not
+     * @return {Boolean} Boolean if user is premium or not
+     */
+    function isPremiumUser() {
+        return getPremiumStatus() == 1;
+    }
+
+
+    /**
      * Returns users logged in status
      * @return {Boolean} Users logged in status
      */
     function isUserLoggedIn() {
         return (typeof getAccessToken() !== "undefined");
     }
 
     /**
@@ -213,30 +250,39 @@ var pktApi = (function() {
         data.locale_lang = window.navigator.language;
         data.consumer_key = oAuthConsumerKey;
 
         var request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest);
         request.open("POST", url, true);
 		request.onreadystatechange = function(e){
 			if (request.readyState == 4) {
 				if (request.status === 200) {
-                    if (options.success) {
-                        options.success(JSON.parse(request.response), request);
+                    // There could still be an error if the response is no valid json
+                    // or does not have status = 1
+                    var response = parseJSON(request.response);
+                    if (options.success && response && response.status == 1) {
+                        options.success(response, request);
+                        return;
                     }
-                    return;
                 }
+
+                // Handle error case
                 if (options.error) {
                     // In case the user did revoke the access token or it's not
                     // valid anymore clear the user data
                     if (request.status === 401) {
                         clearUserData();
                     }
 
                     // Handle error message
-                    var errorMessage = request.getResponseHeader("X-Error") || request.statusText;
+                    var errorMessage;
+                    if (request.status !== 200) {
+                        errorMessage = request.getResponseHeader("X-Error") || request.statusText;
+                        errorMessage = JSON.parse('"' + errorMessage + '"');
+                    }
                     var error = {message: errorMessage};
                     options.error(error, request);
                 }
 			}
 		};
 
 		// Set headers
 		request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
@@ -505,23 +551,16 @@ var pktApi = (function() {
         if (callback) {
             var tags = tagsFromSettings();
             var usedTags = sortedUsedTagsFromSettings();
             callback(tags, usedTags);
         }
     }
 
     /**
-     * Helper method to check if a user is premium or not
-     */
-    function isPremiumUser() {
-        return getSetting('premium_status') == 1;
-    }
-
-    /**
      * Fetch suggested tags for a given item id
      * @param  {string} itemId Item id of
      * @param  {Object | undefined} options Can provide an actionInfo object
      *                                      with further data to send to the API.
      *                                      Can have success and error callbacks
      * @return {Boolean} Returns Boolean whether the api call started sucessfully
      */
     function getSuggestedTagsForItem(itemId, options) {
@@ -560,24 +599,32 @@ var pktApi = (function() {
     }
 
     /**
      * Helper function to get current signup AB group the user is in
      */
     function getSignupAB() {
         if (!getSetting('signupAB'))
         {
-            var rand = (Math.floor(Math.random()*2+1));
-            if (rand == 2)
+            var rand = (Math.floor(Math.random()*100+1));
+            if (rand > 95)
             {
-                setSetting('signupAB','storyboard');
+                setSetting('signupAB','storyboard_nlm');
+            }
+            else if (rand > 90)
+            {
+                setSetting('signupAB','hero_nlm');
+            }
+            else if (rand > 45)
+            {
+                setSetting('signupAB','storyboard_lm');
             }
             else
             {
-                setSetting('signupAB','hero');
+                setSetting('signupAB','hero_lm');
             }
 
         }
         return getSetting('signupAB');
     }
 
     /**
      * Public functions