Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Replace references to KA.getUserID
Browse files Browse the repository at this point in the history
Summary:
We're moving `KA.getUserID` off of the global `window.KA`
object and into the required KA object: D25778, so we can't use it in
khan-exercises any more. There's a new piece of data, `window.KA.userId`
that will be accessible, so use that instead.

Test Plan: - Cross fingers?

Reviewers: jlfwong

Reviewed By: jlfwong

Subscribers: jared

Differential Revision: https://phabricator.khanacademy.org/D25801
  • Loading branch information
xymostech committed Mar 10, 2016
1 parent dd22f33 commit 2a10441
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/calculator/calculator-tail.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ window.Calculator = (function(parser) {
throw new CalculatorError(ERROR_TEXT);
};

var userID = window.KA && window.KA.getUserID && window.KA.getUserID();
var userID = window.KA && window.KA.userId;
var settings = {};
if (window.localStorage != null) {
try {
Expand Down
2 changes: 1 addition & 1 deletion genfiles/calculator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions utils/init-calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ Calculator.init = function() {
Calculator.settings.angleMode === "DEG" ?
"RAD" : "DEG";
if (typeof window.localStorage !== "undefined") {
var userID = window.KA && window.KA.getUserID &&
window.KA.getUserID();
var userID = window.KA && window.KA.userId;
window.localStorage["calculator_settings:" +
userID] = JSON.stringify(
Calculator.settings);
Expand Down

0 comments on commit 2a10441

Please sign in to comment.