Bug 1164698 - Update Pocket code to latest version (May 13th code drop). r=dolske

This commit is contained in:
Nate Weiner 2015-05-13 18:18:29 -07:00
parent cfe639b7c9
commit 1bf4d976bf
2 changed files with 4 additions and 1 deletions

View File

@ -187,6 +187,7 @@ PKT_SIGNUP_OVERLAY.prototype = {
this.getTranslations(); this.getTranslations();
this.dictJSON.fxasignedin = this.fxasignedin ? 1 : 0; this.dictJSON.fxasignedin = this.fxasignedin ? 1 : 0;
this.dictJSON.variant = (this.variant ? this.variant : 'undefined'); this.dictJSON.variant = (this.variant ? this.variant : 'undefined');
this.dictJSON.variant += this.fxasignedin ? '_fxa' : '_nonfxa';
this.dictJSON.pockethost = this.pockethost; this.dictJSON.pockethost = this.pockethost;
this.dictJSON.showlearnmore = (this.variant.indexOf('_lm') > -1 || this.variant == 'storyboard' || this.variant == 'hero') ? 1 : 0; this.dictJSON.showlearnmore = (this.variant.indexOf('_lm') > -1 || this.variant == 'storyboard' || this.variant == 'hero') ? 1 : 0;

View File

@ -247,7 +247,9 @@ var pktApi = (function() {
var url = baseAPIUrl + options.path; var url = baseAPIUrl + options.path;
var data = options.data || {}; var data = options.data || {};
data.locale_lang = window.navigator.language; data.locale_lang = Cc["@mozilla.org/chrome/chrome-registry;1"].
getService(Ci.nsIXULChromeRegistry).
getSelectedLocale("browser");
data.consumer_key = oAuthConsumerKey; data.consumer_key = oAuthConsumerKey;
var request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest); var request = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest);