Merge pull request #1543 from thelounge/xpaw/remove-dupe-keybindings

Remove duplicate keybindings help
This commit is contained in:
Pavel Djundik 2017-09-20 11:09:58 +03:00 committed by GitHub
commit 75555d90ee
3 changed files with 19 additions and 75 deletions

View File

@ -1469,6 +1469,15 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
line-height: 1.8; line-height: 1.8;
} }
.is-apple #help .key-all,
#help .key-apple {
display: none;
}
.is-apple #help .key-apple {
display: inline-block;
}
#form { #form {
background: #eee; background: #eee;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;

View File

@ -392,11 +392,9 @@
<h2>Keyboard Shortcuts</h2> <h2>Keyboard Shortcuts</h2>
<h3>On Windows / Linux</h3>
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd></kbd> / <kbd></kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd></kbd> / <kbd></kbd>
</div> </div>
<div class="description"> <div class="description">
<p>Switch to the previous/next window in the channel list</p> <p>Switch to the previous/next window in the channel list</p>
@ -405,7 +403,7 @@
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>K</kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd>K</kbd>
</div> </div>
<div class="description"> <div class="description">
<p> <p>
@ -422,7 +420,7 @@
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>B</kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd>B</kbd>
</div> </div>
<div class="description"> <div class="description">
<p>Mark all text typed after this shortcut as bold.</p> <p>Mark all text typed after this shortcut as bold.</p>
@ -431,7 +429,7 @@
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>U</kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd>U</kbd>
</div> </div>
<div class="description"> <div class="description">
<p>Mark all text typed after this shortcut as underlined.</p> <p>Mark all text typed after this shortcut as underlined.</p>
@ -440,7 +438,7 @@
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>I</kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd>I</kbd>
</div> </div>
<div class="description"> <div class="description">
<p>Mark all text typed after this shortcut as italics.</p> <p>Mark all text typed after this shortcut as italics.</p>
@ -449,74 +447,7 @@
<div class="help-item"> <div class="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>O</kbd> <kbd class="key-all">Ctrl</kbd><kbd class="key-apple"></kbd> + <kbd>O</kbd>
</div>
<div class="description">
<p>
Mark all text typed after this shortcut to be reset to its
original formatting.
</p>
</div>
</div>
<h3>On macOS</h3>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd></kbd> / <kbd></kbd>
</div>
<div class="description">
<p>Switch to the previous/next window in the channel list</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>K</kbd>
</div>
<div class="description">
<p>
Mark any text typed after this shortcut to be colored. After
hitting this shortcut, enter an integer in the
<code>0—15</code> range to select the desired color.
</p>
<p>
A color reference can be found
<a href="https://modern.ircdocs.horse/formatting.html#colors" target="_blank" rel="noopener">here</a>.
</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>B</kbd>
</div>
<div class="description">
<p>Mark all text typed after this shortcut as bold.</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>U</kbd>
</div>
<div class="description">
<p>Mark all text typed after this shortcut as underlined.</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>I</kbd>
</div>
<div class="description">
<p>Mark all text typed after this shortcut as italics.</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>O</kbd>
</div> </div>
<div class="description"> <div class="description">
<p> <p>

View File

@ -168,6 +168,10 @@ $(function() {
}); });
} }
if (navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i)) {
$(document.body).addClass("is-apple");
}
$("#form").on("submit", function(e) { $("#form").on("submit", function(e) {
e.preventDefault(); e.preventDefault();
utils.forceFocus(); utils.forceFocus();