fixes for edge
This commit is contained in:
parent
c66803ce1f
commit
69abbdaf8d
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue