mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Upgraded some old JavaScript to ECMAScript 1.6
Removed some jQuery references Added JavaScript Globals.$htmlCL for frequently used window.document.documentElement.classList
This commit is contained in:
parent
a6a337e5ce
commit
0b0747b8dc
19 changed files with 142 additions and 151 deletions
|
|
@ -10,9 +10,8 @@ $win.__sizes = [0, 0];
|
|||
|
||||
export { $win };
|
||||
|
||||
export const $doc = $(window.document);
|
||||
|
||||
export const $html = $('html');
|
||||
export const $htmlCL = window.document.documentElement.classList;
|
||||
|
||||
export const $body = $('body');
|
||||
|
||||
|
|
@ -71,7 +70,7 @@ export const bMobileDevice = (/android|iphone|ipod|ipad|blackberry|mobile/i).tes
|
|||
* @type {boolean}
|
||||
*/
|
||||
export const bAnimationSupported =
|
||||
!bMobileDevice && $html.hasClass('csstransitions') && $html.hasClass('cssanimations');
|
||||
!bMobileDevice && $htmlCL.contains('csstransitions') && $htmlCL.contains('cssanimations');
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
|
|
@ -200,7 +199,7 @@ export const popupVisibilityNames = ko.observableArray([]);
|
|||
export const popupVisibility = ko.computed(() => 0 < popupVisibilityNames().length);
|
||||
|
||||
popupVisibility.subscribe((bValue) => {
|
||||
$html.toggleClass('rl-modal', bValue);
|
||||
$htmlCL.toggle('rl-modal', bValue);
|
||||
});
|
||||
|
||||
// keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue