MCPcopy Index your code
hub / github.com/refined-github/refined-github / initOnce

Function initOnce

source/features/profile-hotkey.tsx:8–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6import onetime from '../helpers/onetime.js';
7
8function initOnce(): void {
9 // This patterns also works on gist.github.com
10 const origin = isEnterprise() ? location.origin : 'https://github.com';
11 const profileLink = new URL(getLoggedInUser()!, origin);
12 registerHotkey('g m', profileLink.href);
13}
14
15void features.add(import.meta.url, {
16 shortcuts: {

Callers

nothing calls this directly

Calls 2

isEnterpriseFunction · 0.85
registerHotkeyFunction · 0.85

Tested by

no test coverage detected