From 1c065ad1b64406eb2357ce81a4802f2435f37eb1 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 19 Sep 2017 12:18:54 +0300 Subject: [PATCH] Remove duplicate keybindings help --- client/css/style.css | 9 +++++ client/index.html | 81 ++++---------------------------------------- client/js/lounge.js | 4 +++ 3 files changed, 19 insertions(+), 75 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index d4dd6b10..c88f9f20 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1469,6 +1469,15 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */ line-height: 1.8; } +.is-apple #help .key-all, +#help .key-apple { + display: none; +} + +.is-apple #help .key-apple { + display: inline-block; +} + #form { background: #eee; border-top: 1px solid #ddd; diff --git a/client/index.html b/client/index.html index 61abcde2..5b170e63 100644 --- a/client/index.html +++ b/client/index.html @@ -392,11 +392,9 @@

Keyboard Shortcuts

-

On Windows / Linux

-
- Ctrl + / + Ctrl + /

Switch to the previous/next window in the channel list

@@ -405,7 +403,7 @@
- Ctrl + K + Ctrl + K

@@ -422,7 +420,7 @@

- Ctrl + B + Ctrl + B

Mark all text typed after this shortcut as bold.

@@ -431,7 +429,7 @@
- Ctrl + U + Ctrl + U

Mark all text typed after this shortcut as underlined.

@@ -440,7 +438,7 @@
- Ctrl + I + Ctrl + I

Mark all text typed after this shortcut as italics.

@@ -449,74 +447,7 @@
- Ctrl + O -
-
-

- Mark all text typed after this shortcut to be reset to its - original formatting. -

-
-
- -

On macOS

- -
-
- + / -
-
-

Switch to the previous/next window in the channel list

-
-
- -
-
- + K -
-
-

- Mark any text typed after this shortcut to be colored. After - hitting this shortcut, enter an integer in the - 0—15 range to select the desired color. -

-

- A color reference can be found - here. -

-
-
- -
-
- + B -
-
-

Mark all text typed after this shortcut as bold.

-
-
- -
-
- + U -
-
-

Mark all text typed after this shortcut as underlined.

-
-
- -
-
- + I -
-
-

Mark all text typed after this shortcut as italics.

-
-
- -
-
- + O + Ctrl + O

diff --git a/client/js/lounge.js b/client/js/lounge.js index ef4e20a1..2bc96530 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -168,6 +168,10 @@ $(function() { }); } + if (navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)) { + $(document.body).addClass("is-apple"); + } + $("#form").on("submit", function(e) { e.preventDefault(); utils.forceFocus();