Skip to content

Commit

Permalink
Merge pull request #118 from github/user-agent
Browse files Browse the repository at this point in the history
Add user agent to mapper tool
  • Loading branch information
iansan5653 authored Dec 12, 2023
2 parents bd832b7 + 94a436c commit 2884286
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pages/hotkey_mapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ <h1 id="app-name">Hotkey Code</h1>

<button id="reset-button" class="btn">Reset</button>

<clipboard-copy for="hotkey-code" class="btn"> Copy to clipboard </clipboard-copy>
<clipboard-copy for="hotkey-code" class="btn">Copy to clipboard</clipboard-copy>
</div>
</div>

<div class="mt-2 color-fg-muted">
<span class="text-bold" id="user-agent-label">Your user agent:</span>

<code id="user-agent" aria-labelledby="user-agent-label" class="d-block">...</code>
</div>
</div>

<script type="module">
import {eventToHotkeyString} from './hotkey/index.js'
import {SEQUENCE_DELIMITER, SequenceTracker} from './hotkey/sequence.js'

const userAgentElement = document.getElementById('user-agent')
userAgentElement.textContent = navigator.userAgent

const hotkeyCodeElement = document.getElementById('hotkey-code')
const sequenceStatusElement = document.getElementById('sequence-status')
const resetButtonElement = document.getElementById('reset-button')
Expand Down

0 comments on commit 2884286

Please sign in to comment.