From 1256e6ddc79c7527af6882acaa1b67ad0fa9456b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 6 Apr 2018 15:52:53 -0400 Subject: [PATCH] add size adjustment classes --- src/popup2/services/services.module.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/popup2/services/services.module.ts b/src/popup2/services/services.module.ts index 66dff1297a..0357b4e823 100644 --- a/src/popup2/services/services.module.ts +++ b/src/popup2/services/services.module.ts @@ -60,10 +60,15 @@ export const authService = new AuthService(getBgService('cryptoSe export function initFactory(i18nService: I18nService, storageService: StorageService): Function { return async () => { - const htmlEl = window.document.documentElement; + if (window.screen.availHeight < 600) { + window.document.body.classList.add('xs'); + } else if (window.screen.availHeight <= 800) { + window.document.body.classList.add('sm'); + } + if (i18nService != null) { + window.document.documentElement.classList.add('locale_' + i18nService.translationLocale); authService.init(); - htmlEl.classList.add('locale_' + i18nService.translationLocale); } stateService.save(ConstantsService.disableFaviconKey,