Add keyboard shortcut customization instructions (#278)

This commit is contained in:
Federico Brigante 2023-03-24 13:20:29 +08:00 committed by GitHub
parent c33d6bf040
commit 3722bdecb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View File

@ -19,3 +19,8 @@
#serverPort {
width: 7em;
}
html:not(.chrome) .chrome-only,
html:not(.firefox) .firefox-only {
display: none;
}

View File

@ -44,7 +44,15 @@
</label>
</p>
</form>
<hr>
<div class="firefox-only">
<h3>Shortcuts</h3>
<p>You can customize the keyboard shortcuts by clicking the gear icon in the upper-right corner and selecting "Manage Extension Shortcuts".</p>
</div>
<div class="chrome-only">
<h3>Shortcuts</h3>
<p>You can customize the keyboard shortcuts by visiting Chromes extensions shortcuts page. Copy-paste this URL: <code>chrome://extensions/shortcuts</code></p>
</div>
<h3>Info</h3>
<p>You can find information on how GhostText works and how to troubleshoot any issues on <a href="https://github.com/fregante/GhostText">its repo</a>.</p>
<p>If you find this useful, consider supporting its development by <a href="https://github.com/sponsors/fregante">donating or sponsoring me on GitHub</a>.</p>
<p>Made with 🍕 by <a href="https://fregante.com">fregante</a>.</p>

View File

@ -1,3 +1,9 @@
import optionsStorage from './options-storage.js';
optionsStorage.syncForm(document.querySelector('form'));
if (location.protocol.startsWith('moz-')) {
document.documentElement.classList.add('firefox');
} else if (location.protocol.startsWith('chrome-')) {
document.documentElement.classList.add('chrome');
}