From 3d4baa46dd9f9229eeafd0a3ce8f6ca21fb47544 Mon Sep 17 00:00:00 2001 From: Darren Date: Fri, 8 Apr 2022 07:19:47 -0500 Subject: [PATCH] revert: js revert until I figured out a better way if detecting client. https://github.com/DarrenOfficial/dpaste/issues/196 --- client/js/dpaste.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/dpaste.js b/client/js/dpaste.js index 89fc32b..0eb993f 100644 --- a/client/js/dpaste.js +++ b/client/js/dpaste.js @@ -3,7 +3,7 @@ // ----------------------------------------------------------------------------- // Add data-platform to the body tag to show platform related shortcuts // ----------------------------------------------------------------------------- -const isMac = navigator.userAgentData.platform.includes('Mac') !== -1; +const isMac = navigator.platform.indexOf('Mac') !== -1; document.body.dataset.platform = isMac ? 'mac' : 'win'; // -----------------------------------------------------------------------------