Add debugging tools

This commit is contained in:
yflory
2019-02-25 18:43:32 +01:00
parent 0d996b8ed4
commit ec33084226
9 changed files with 368 additions and 73 deletions

View File

@@ -53,15 +53,22 @@ define([
};
window.addEventListener('message', onMsg);
}).nThen(function (/*waitFor*/) {
var hash = localStorage[Constants.userHashKey];
var drive = hash && ('#'+hash === window.location.hash);
if (!window.location.hash) {
var hash = localStorage[Constants.userHashKey];
if (!hash) {
sessionStorage.redirectTo = '/debug/';
window.location.href = '/login/';
return;
}
drive = true;
window.location.hash = hash;
}
SFCommonO.start();
var addData = function (meta) {
meta.debugDrive = drive;
};
SFCommonO.start({
addData:addData
});
});
});