aboutsummaryrefslogtreecommitdiff
path: root/src/services/window_utils/window_utils.js
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-04-01 22:41:34 +0300
committershpuld <shp@cock.li>2019-04-01 22:41:34 +0300
commit2879495b8ab16a07d337965871e951f660fc1815 (patch)
treee5a9242aa0dfce948110dd670ad6aea88bce382d /src/services/window_utils/window_utils.js
parentc06bcf3303d89aa44ddcdad3a9d2f723303ae3d1 (diff)
remove window width copypasta
Diffstat (limited to 'src/services/window_utils/window_utils.js')
-rw-r--r--src/services/window_utils/window_utils.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/services/window_utils/window_utils.js b/src/services/window_utils/window_utils.js
new file mode 100644
index 00000000..faff6cb9
--- /dev/null
+++ b/src/services/window_utils/window_utils.js
@@ -0,0 +1,5 @@
+
+export const windowWidth = () =>
+ window.innerWidth ||
+ document.documentElement.clientWidth ||
+ document.body.clientWidth