fixes for edge

This commit is contained in:
Kyle Spearrin 2017-08-28 22:27:29 -04:00
parent c66803ce1f
commit 69abbdaf8d
5 changed files with 33 additions and 7 deletions

View File

@ -1,8 +1,8 @@
var isBackground = true;
var bg_loginsToAdd = [];
var bg_i18nService = new i18nService();
var bg_constantsService = new ConstantsService(bg_i18nService);
var bg_utilsService = new UtilsService();
var bg_i18nService = new i18nService(bg_utilsService);
var bg_constantsService = new ConstantsService(bg_i18nService);
var bg_cryptoService = new CryptoService(bg_constantsService);
var bg_tokenService = new TokenService();
var bg_appIdService = new AppIdService();

View File

@ -6,8 +6,8 @@ angular
var self = this;
self.currentYear = new Date().getFullYear();
self.animation = '';
self.shBody = $window.screen.availHeight < 600;
self.lgBody = !utilsService.isFirefox() && !self.shBody;
self.shBody = $window.screen.availHeight < 650;
self.lgBody = !utilsService.isFirefox() && !utilsService.isEdge() && !self.shBody;
$scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
if (toParams.animation) {

View File

@ -41,7 +41,8 @@ body.sh {
bottom: 0;
left: 0;
right: 0;
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
background-color: @background-color;
&.content-tabs {

View File

@ -660,7 +660,7 @@ function initCryptoService(constantsService) {
}
var ctArr = fromB64ToArray(encPieces[0]);
return _subtle.decrypt({ name: padding.name }, privateKey, ctArr.buffer);
return _subtle.decrypt(padding, privateKey, ctArr.buffer);
}, function () {
throw 'Cannot import privateKey.';
}).then(function (decBytes) {

View File

@ -1,4 +1,29 @@
function i18nService() {
function i18nService(utilsService) {
this.utilsService = utilsService;
this.messages = {};
var self = this;
if (self.utilsService.isEdge()) {
var rawFile = new XMLHttpRequest();
rawFile.open('GET', '../_locales/en/messages.json', false);
rawFile.onreadystatechange = function () {
if (rawFile.readyState === 4) {
if (rawFile.status === 200 || rawFile.status == 0) {
var locales = JSON.parse(rawFile.responseText);
for (var property in locales) {
if (locales.hasOwnProperty(property)) {
self.messages[property] = chrome.i18n.getMessage(property);
}
}
}
}
}
rawFile.send(null);
return self.messages;
}
return new Proxy({}, {
get: function (target, name) {
return chrome.i18n.getMessage(name);