aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/misc/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/misc/utils.ts')
-rw-r--r--client/src/app/shared/misc/utils.ts14
1 files changed, 0 insertions, 14 deletions
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index 2219ac802..53aff1b24 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -96,26 +96,12 @@ function lineFeedToHtml (obj: object, keyToNormalize: string) {
96 }) 96 })
97} 97}
98 98
99// Try to cache a little bit window.innerWidth
100let windowInnerWidth = window.innerWidth
101setInterval(() => windowInnerWidth = window.innerWidth, 500)
102
103function isInSmallView () {
104 return windowInnerWidth < 600
105}
106
107function isInMobileView () {
108 return windowInnerWidth < 500
109}
110
111export { 99export {
112 objectToUrlEncoded, 100 objectToUrlEncoded,
113 getParameterByName, 101 getParameterByName,
114 populateAsyncUserVideoChannels, 102 populateAsyncUserVideoChannels,
115 getAbsoluteAPIUrl, 103 getAbsoluteAPIUrl,
116 dateToHuman, 104 dateToHuman,
117 isInSmallView,
118 isInMobileView,
119 immutableAssign, 105 immutableAssign,
120 objectToFormData, 106 objectToFormData,
121 lineFeedToHtml 107 lineFeedToHtml